diff options
author | David Ayers <ayers@fsfe.org> | 2009-04-30 16:03:44 +0000 |
---|---|---|
committer | David Ayers <ayers@gcc.gnu.org> | 2009-04-30 16:03:44 +0000 |
commit | 512e7d7fb0d968c92c85f3cc3c73c3eaea993dfe (patch) | |
tree | 94255314b2005ce3f4e0e276991b46168cfae023 /gcc | |
parent | ee56ac9def714d225c4c7d1020390241780595c0 (diff) | |
download | gcc-512e7d7fb0d968c92c85f3cc3c73c3eaea993dfe.zip gcc-512e7d7fb0d968c92c85f3cc3c73c3eaea993dfe.tar.gz gcc-512e7d7fb0d968c92c85f3cc3c73c3eaea993dfe.tar.bz2 |
objc.exp (objc_init): Add and set gcc_warning_prefix and gcc_error_prefix variables.
2009-04-30 David Ayers <ayers@fsfe.org>
* lib/objc.exp (objc_init): Add and set gcc_warning_prefix
and gcc_error_prefix variables.
* objc.dg/bad-receiver-type.m: Update to match correct
diagnostics marker.
* objc.dg/encode-5.m: Likewise.
* objc.dg/id-1.m: Likewise.
* objc.dg/method-1.m: Likewise.
* objc.dg/method-6.m: Likewise.
* objc.dg/method-7.m: Likewise.
* objc.dg/method-9.m: Likewise.
* objc.dg/method-11.m: Likewise.
* objc.dg/method-20.m: Likewise.
* objc.dg/private-1.m: Likewise.
From-SVN: r147006
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 16 | ||||
-rw-r--r-- | gcc/testsuite/lib/objc.exp | 5 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/bad-receiver-type.m | 2 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/encode-5.m | 2 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/id-1.m | 2 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-1.m | 4 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-11.m | 6 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-20.m | 1 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-6.m | 4 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-7.m | 4 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/method-9.m | 6 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/private-1.m | 4 |
12 files changed, 39 insertions, 17 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 65181df..61a47f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,19 @@ +2009-04-30 David Ayers <ayers@fsfe.org> + + * lib/objc.exp (objc_init): Add and set gcc_warning_prefix + and gcc_error_prefix variables. + * objc.dg/bad-receiver-type.m: Update to match correct + diagnostics marker. + * objc.dg/encode-5.m: Likewise. + * objc.dg/id-1.m: Likewise. + * objc.dg/method-1.m: Likewise. + * objc.dg/method-6.m: Likewise. + * objc.dg/method-7.m: Likewise. + * objc.dg/method-9.m: Likewise. + * objc.dg/method-11.m: Likewise. + * objc.dg/method-20.m: Likewise. + * objc.dg/private-1.m: Likewise. + 2009-04-30 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/39667 diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp index e763fc2..934f31d 100644 --- a/gcc/testsuite/lib/objc.exp +++ b/gcc/testsuite/lib/objc.exp @@ -95,6 +95,8 @@ proc objc_init { args } { global OBJC_UNDER_TEST global TOOL_EXECUTABLE global objc_libgcc_s_path + global gcc_warning_prefix + global gcc_error_prefix # We set LC_ALL and LANG to C so that we get the same error messages as expected. setenv LC_ALL C @@ -114,6 +116,9 @@ proc objc_init { args } { set tmpdir /tmp } + set gcc_warning_prefix "warning:" + set gcc_error_prefix "error:" + objc_maybe_build_wrapper "${tmpdir}/objc-testglue.o" set objc_libgcc_s_path [gcc-set-multilib-library-path $OBJC_UNDER_TEST] diff --git a/gcc/testsuite/objc.dg/bad-receiver-type.m b/gcc/testsuite/objc.dg/bad-receiver-type.m index 36f4cf3..8ab2962 100644 --- a/gcc/testsuite/objc.dg/bad-receiver-type.m +++ b/gcc/testsuite/objc.dg/bad-receiver-type.m @@ -11,5 +11,5 @@ extern int foo(); void baz() { [foo test]; /* { dg-warning "invalid receiver type" } */ - /* { dg-warning "cannot convert to a pointer type" "" { target *-*-* } 13 } */ + /* { dg-error "cannot convert to a pointer type" "" { target *-*-* } 13 } */ } diff --git a/gcc/testsuite/objc.dg/encode-5.m b/gcc/testsuite/objc.dg/encode-5.m index f2cb693..35b6148 100644 --- a/gcc/testsuite/objc.dg/encode-5.m +++ b/gcc/testsuite/objc.dg/encode-5.m @@ -28,7 +28,7 @@ @interface Test : Object { float j; } -(void) test2: (int [5])a with: (int [])b; --(id) test3: (Test **)b; /* { dg-warning "previous declaration of .\\-\\(id\\)test3:\\(Test \\*\\*\\)b." } */ +-(id) test3: (Test **)b; /* { dg-message "previous declaration of .\\-\\(id\\)test3:\\(Test \\*\\*\\)b." } */ @end @implementation Test diff --git a/gcc/testsuite/objc.dg/id-1.m b/gcc/testsuite/objc.dg/id-1.m index ceb4d89..2bfcc63 100644 --- a/gcc/testsuite/objc.dg/id-1.m +++ b/gcc/testsuite/objc.dg/id-1.m @@ -2,6 +2,6 @@ /* { dg-do compile } */ typedef int id; /* { dg-error "conflicting types for .id." } */ -/* { dg-error "previous declaration of .id. was here" "" { target *-*-* } 0 } */ +/* { dg-message "previous declaration of .id. was here" "" { target *-*-* } 0 } */ id b; diff --git a/gcc/testsuite/objc.dg/method-1.m b/gcc/testsuite/objc.dg/method-1.m index a73a0f4..ce2aab1 100644 --- a/gcc/testsuite/objc.dg/method-1.m +++ b/gcc/testsuite/objc.dg/method-1.m @@ -16,7 +16,7 @@ @end @implementation class3 -- (int) meth1 { return 0; } /* { dg-error "previous definition" } */ +- (int) meth1 { return 0; } /* { dg-message "previous definition" } */ - (int) meth1 { return 0; } /* { dg-error "redefinition of" } */ @end @@ -25,6 +25,6 @@ @end @implementation class4 -+ (void) meth1 {} /* { dg-error "previous definition" } */ ++ (void) meth1 {} /* { dg-message "previous definition" } */ + (void) meth1 {} /* { dg-error "redefinition of" } */ @end diff --git a/gcc/testsuite/objc.dg/method-11.m b/gcc/testsuite/objc.dg/method-11.m index 5921292..ddd0121 100644 --- a/gcc/testsuite/objc.dg/method-11.m +++ b/gcc/testsuite/objc.dg/method-11.m @@ -24,9 +24,9 @@ void foo(void) { id obj1, obj2 = 0; obj2 = [obj1 initWithData: obj2]; /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 25 } */ - /* { dg-warning "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 12 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 16 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 20 } */ + /* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 12 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 16 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 20 } */ /* The following error is a consequence of picking the "wrong" method signature. */ /* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } 25 } */ diff --git a/gcc/testsuite/objc.dg/method-20.m b/gcc/testsuite/objc.dg/method-20.m index 653e047..722463c 100644 --- a/gcc/testsuite/objc.dg/method-20.m +++ b/gcc/testsuite/objc.dg/method-20.m @@ -5,4 +5,5 @@ @ implementation NGActiveSocket + (void) socketPair:(int[m]) _pair {} /* { dg-error "" } */ + /* { dg-warning "" "" { target *-*-* } 7 } */ @end diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m index aa94bac..8d868d1 100644 --- a/gcc/testsuite/objc.dg/method-6.m +++ b/gcc/testsuite/objc.dg/method-6.m @@ -20,8 +20,8 @@ void foo(void) { Class receiver; [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ - /* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ - /* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ + /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */ + /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */ [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */ diff --git a/gcc/testsuite/objc.dg/method-7.m b/gcc/testsuite/objc.dg/method-7.m index 60ec455..310976a 100644 --- a/gcc/testsuite/objc.dg/method-7.m +++ b/gcc/testsuite/objc.dg/method-7.m @@ -22,8 +22,8 @@ id foo(void) { /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 20 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 20 } */ [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */ - /* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 10 } */ - /* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */ + /* { dg-message "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 10 } */ + /* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 14 } */ return obj; } diff --git a/gcc/testsuite/objc.dg/method-9.m b/gcc/testsuite/objc.dg/method-9.m index ade5d64..d29b888 100644 --- a/gcc/testsuite/objc.dg/method-9.m +++ b/gcc/testsuite/objc.dg/method-9.m @@ -34,9 +34,9 @@ { NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data]; /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 35 } */ - /* { dg-warning "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 11 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 19 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 15 } */ + /* { dg-message "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 11 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 19 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 15 } */ /* The following warning is a consequence of picking the "wrong" method signature. */ /* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } 35 } */ diff --git a/gcc/testsuite/objc.dg/private-1.m b/gcc/testsuite/objc.dg/private-1.m index f4d8a52..a6ae82f 100644 --- a/gcc/testsuite/objc.dg/private-1.m +++ b/gcc/testsuite/objc.dg/private-1.m @@ -50,8 +50,8 @@ int main (void) { int access; - access = m->private; /* { dg-error "is @private" } */ - access = m->protected; /* { dg-error "is @protected" } */ + access = m->private; /* { dg-warning "is @private" } */ + access = m->protected; /* { dg-warning "is @protected" } */ access = m->public; /* Ok */ } |