From: Nicola Pero Date: Wed, 12 Jan 2011 09:46:56 +0000 (+0000) Subject: In gcc/testsuite/: 2011-01-12 Nicola Pero X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81dc6eea5e96c6ec48f6a1d1e8855db0d8805bdd;p=gcc.git In gcc/testsuite/: 2011-01-12 Nicola Pero In gcc/testsuite/: 2011-01-12 Nicola Pero Fixed the Objective-C++ testsuite and updated all tests. * lib/obj-c++.exp (obj-c++_init): Declare and set gcc_warning_prefix and gcc_error_prefix. * obj-c++.dg/attributes/categ-attribute-2.mm: Fixed usage of 'dg-warning', 'dg-message' and 'dg-error'. * obj-c++.dg/class-extension-3.mm: Likewise. * obj-c++.dg/class-protocol-1.mm: Likewise. * obj-c++.dg/cxx-scope-2.mm: Likewise. * obj-c++.dg/encode-7.mm: Likewise. * obj-c++.dg/exceptions-3.mm: Likewise. * obj-c++.dg/exceptions-5.mm: Likewise. * obj-c++.dg/method-12.mm: Likewise. * obj-c++.dg/method-13.mm: Likewise. * obj-c++.dg/method-15.mm: Likewise. * obj-c++.dg/method-16.mm: Likewise. * obj-c++.dg/method-4.mm: Likewise. * obj-c++.dg/method-8.mm: Likewise. * obj-c++.dg/method-conflict-1.mm: Likewise. * obj-c++.dg/method-conflict-2.mm: Likewise. * obj-c++.dg/method-conflict-3.mm: Likewise. Also, removed FIXME and uncommented second part of the testcase now that the testsuite works correctly. * obj-c++.dg/method-conflict-4.mm: Likewise. Also, removed FIXME and uncommented second part of the testcase now that the testsuite works correctly. * obj-c++.dg/private-1.mm: Likewise. * obj-c++.dg/proto-lossage-4.mm: Likewise. * obj-c++.dg/syntax-error-7.mm: Likewise. * obj-c++.dg/warn5.mm: Likewise. * obj-c++.dg/property/at-property-14.mm: Likewise. * obj-c++.dg/property/at-property-16.mm: Likewise, and removed FIXME. * obj-c++.dg/property/at-property-18.mm: Likewise. * obj-c++.dg/property/at-property-20.mm: Likewise, and removed FIXME. * obj-c++.dg/property/at-property-21.mm: Likewise. * obj-c++.dg/property/at-property-28.mm: Likewise. * obj-c++.dg/property/at-property-5.mm: Likewise. * obj-c++.dg/property/dynamic-2.mm: Likewise. * obj-c++.dg/property/property-neg-3.mm: Likewise. * obj-c++.dg/property/synthesize-11.mm: Likewise. * obj-c++.dg/property/synthesize-6.mm: Likewise. * obj-c++.dg/property/synthesize-8.mm: Likewise. * obj-c++.dg/property/synthesize-9.mm: Likewise. * obj-c++.dg/tls/diag-5.mm: Likewise. * obj-c++.dg/ivar-invalid-type-1.mm: Removed FIXME and uncommented dg-error, now matched correctly. From-SVN: r168699 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 15ffa935e81..3450fdf6b67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,52 @@ +2011-01-12 Nicola Pero + + Fixed the Objective-C++ testsuite and updated all tests. + * lib/obj-c++.exp (obj-c++_init): Declare and set + gcc_warning_prefix and gcc_error_prefix. + * obj-c++.dg/attributes/categ-attribute-2.mm: Fixed usage of + 'dg-warning', 'dg-message' and 'dg-error'. + * obj-c++.dg/class-extension-3.mm: Likewise. + * obj-c++.dg/class-protocol-1.mm: Likewise. + * obj-c++.dg/encode-7.mm: Likewise. + * obj-c++.dg/exceptions-3.mm: Likewise. + * obj-c++.dg/exceptions-5.mm: Likewise. + * obj-c++.dg/method-12.mm: Likewise. + * obj-c++.dg/method-13.mm: Likewise. + * obj-c++.dg/method-15.mm: Likewise. + * obj-c++.dg/method-16.mm: Likewise. + * obj-c++.dg/method-4.mm: Likewise. + * obj-c++.dg/method-8.mm: Likewise. + * obj-c++.dg/method-conflict-1.mm: Likewise. + * obj-c++.dg/method-conflict-2.mm: Likewise. + * obj-c++.dg/method-conflict-3.mm: Likewise. Also, removed FIXME + and uncommented second part of the testcase now that the testsuite + works correctly. + * obj-c++.dg/method-conflict-4.mm: Likewise. Also, removed FIXME + and uncommented second part of the testcase now that the testsuite + works correctly. + * obj-c++.dg/private-1.mm: Likewise. + * obj-c++.dg/proto-lossage-4.mm: Likewise. + * obj-c++.dg/syntax-error-7.mm: Likewise. + * obj-c++.dg/warn5.mm: Likewise. + * obj-c++.dg/property/at-property-14.mm: Likewise. + * obj-c++.dg/property/at-property-16.mm: Likewise, and removed + FIXME. + * obj-c++.dg/property/at-property-18.mm: Likewise. + * obj-c++.dg/property/at-property-20.mm: Likewise, and removed + FIXME. + * obj-c++.dg/property/at-property-21.mm: Likewise. + * obj-c++.dg/property/at-property-28.mm: Likewise. + * obj-c++.dg/property/at-property-5.mm: Likewise. + * obj-c++.dg/property/dynamic-2.mm: Likewise. + * obj-c++.dg/property/property-neg-3.mm: Likewise. + * obj-c++.dg/property/synthesize-11.mm: Likewise. + * obj-c++.dg/property/synthesize-6.mm: Likewise. + * obj-c++.dg/property/synthesize-8.mm: Likewise. + * obj-c++.dg/property/synthesize-9.mm: Likewise. + * obj-c++.dg/tls/diag-5.mm: Likewise. + * obj-c++.dg/ivar-invalid-type-1.mm: Removed FIXME and uncommented + dg-error, now matched correctly. + 2011-01-12 Nicola Pero * objc.dg/property/at-property-29.m: New. diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp index a2020fa7914..57bab524a32 100644 --- a/gcc/testsuite/lib/obj-c++.exp +++ b/gcc/testsuite/lib/obj-c++.exp @@ -211,6 +211,8 @@ proc obj-c++_init { args } { global OBJCXX_UNDER_TEST global TESTING_IN_BUILD_TREE global target_triplet + global gcc_warning_prefix + global gcc_error_prefix if ![info exists OBJCXX_UNDER_TEST] then { if [info exists TOOL_EXECUTABLE] { @@ -265,6 +267,9 @@ proc obj-c++_init { args } { # error-message parsing machinery. lappend ALWAYS_OBJCXXFLAGS "additional_flags=-fmessage-length=0" + set gcc_warning_prefix "warning:" + set gcc_error_prefix "error:" + if { [string match "*-*-darwin*" $target_triplet] } { lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress" } diff --git a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm index 631607a0147..d2fb7891384 100644 --- a/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm +++ b/gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm @@ -20,7 +20,7 @@ __attribute__ ((deprecated("no dep_categ"))) @end __attribute__ ((deprecated)) -@implementation obj (dep_categ) /* { dg-error "prefix attributes are ignored before" } */ +@implementation obj (dep_categ) /* { dg-warning "prefix attributes are ignored before" } */ - (int) depmth { return var + 1; } @end diff --git a/gcc/testsuite/obj-c++.dg/class-extension-3.mm b/gcc/testsuite/obj-c++.dg/class-extension-3.mm index 1d9d11b684e..69e57053969 100644 --- a/gcc/testsuite/obj-c++.dg/class-extension-3.mm +++ b/gcc/testsuite/obj-c++.dg/class-extension-3.mm @@ -10,8 +10,8 @@ Class isa; int count; } -- (int) test; /* { dg-warning "previous declaration" } */ -@property int count; /* { dg-warning "originally specified here" } */ +- (int) test; /* { dg-message "previous declaration" } */ +@property int count; /* { dg-message "originally specified here" } */ @end @interface MyObject () diff --git a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm index 6391fda6f12..2ab702a4dfb 100644 --- a/gcc/testsuite/obj-c++.dg/class-protocol-1.mm +++ b/gcc/testsuite/obj-c++.dg/class-protocol-1.mm @@ -326,8 +326,8 @@ testComptypes(void) objP1 == cls; /* { dg-warning "lacks a cast" } */ } { /* id , non-ObjC */ - num == objP1; /* { dg-warning "between pointer" } */ - objP1 == num; /* { dg-warning "between pointer" } */ + num == objP1; /* { dg-error "between pointer" } */ + objP1 == num; /* { dg-error "between pointer" } */ ptr == objP1; objP1 == ptr; @@ -352,8 +352,8 @@ testComptypes(void) clsP1 == cls; } { /* Class , non-ObjC */ - num == clsP1; /* { dg-warning "between pointer" } */ - clsP1 == num; /* { dg-warning "between pointer" } */ + num == clsP1; /* { dg-error "between pointer" } */ + clsP1 == num; /* { dg-error "between pointer" } */ ptr == clsP1; clsP1 == ptr; diff --git a/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm b/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm index 21fed5085fc..c793b282f39 100644 --- a/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm +++ b/gcc/testsuite/obj-c++.dg/cxx-scope-2.mm @@ -11,9 +11,9 @@ @end int main(void) { - id i = [std::iostream new]; /* { dg-warning "not an Objective\\-C class name or alias" } */ + id i = [std::iostream new]; /* { dg-error "not an Objective\\-C class name or alias" } */ i = [iostream new]; - i = [std::basic_string new]; /* { dg-warning "not an Objective\\-C class name or alias" } */ + i = [std::basic_string new]; /* { dg-error "not an Objective\\-C class name or alias" } */ return 0; } diff --git a/gcc/testsuite/obj-c++.dg/encode-7.mm b/gcc/testsuite/obj-c++.dg/encode-7.mm index 40b1510bef0..523c7ce02e8 100644 --- a/gcc/testsuite/obj-c++.dg/encode-7.mm +++ b/gcc/testsuite/obj-c++.dg/encode-7.mm @@ -26,7 +26,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/obj-c++.dg/exceptions-3.mm b/gcc/testsuite/obj-c++.dg/exceptions-3.mm index adae263790f..bf0be018e03 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-3.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-3.mm @@ -71,9 +71,9 @@ int test (id object) @try { @throw object; } @catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */ - dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ - } /* { dg-warning "candidate" "" { target *-*-* } 13 } */ - /* { dg-warning "candidate" "" { target *-*-* } 72 } */ + dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */ + } /* { dg-message "candidate" "" { target *-*-* } 13 } */ + /* { dg-message "candidates" "" { target *-*-* } 72 } */ @try { @throw object; } @catch (static MyObject *x) /* { dg-error "storage class" } */ { diff --git a/gcc/testsuite/obj-c++.dg/exceptions-5.mm b/gcc/testsuite/obj-c++.dg/exceptions-5.mm index ba0e543e98a..1ea9a6f4610 100644 --- a/gcc/testsuite/obj-c++.dg/exceptions-5.mm +++ b/gcc/testsuite/obj-c++.dg/exceptions-5.mm @@ -71,9 +71,9 @@ int test (id object) @try { @throw object; } @catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */ - dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ - } /* { dg-warning "candidate" "" { target *-*-* } 13 } */ - /* { dg-warning "candidate" "" { target *-*-* } 72 } */ + dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */ + } /* { dg-message "candidate" "" { target *-*-* } 13 } */ + /* { dg-message "candidate" "" { target *-*-* } 72 } */ @try { @throw object; } @catch (static MyObject *) /* { dg-error "storage class" } */ diff --git a/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm b/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm index bd2094ade07..4c1480a6be9 100644 --- a/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm +++ b/gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm @@ -14,6 +14,6 @@ static int c; /* { dg-error "invalid type" } */ inline int d; /* { dg-error "declared as an .inline." } */ typedef int e; /* { dg-error "invalid type" } */ - __thread int f; /* dg-error "invalid type" */ /* FIXME: The compiler generates this message, but the testsuite does not match it. */ + __thread int f; /* { dg-error "invalid type" } */ } @end diff --git a/gcc/testsuite/obj-c++.dg/method-12.mm b/gcc/testsuite/obj-c++.dg/method-12.mm index e3620708a9d..7c6916b320d 100644 --- a/gcc/testsuite/obj-c++.dg/method-12.mm +++ b/gcc/testsuite/obj-c++.dg/method-12.mm @@ -19,8 +19,8 @@ void foo(void) { Class receiver; [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ - /* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */ - /* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */ + /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */ + /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */ [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */ diff --git a/gcc/testsuite/obj-c++.dg/method-13.mm b/gcc/testsuite/obj-c++.dg/method-13.mm index 18fb7cd3ae5..6938f7d349a 100644 --- a/gcc/testsuite/obj-c++.dg/method-13.mm +++ b/gcc/testsuite/obj-c++.dg/method-13.mm @@ -20,8 +20,8 @@ id foo(void) { /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */ [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */ - /* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */ - /* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */ + /* { dg-message "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */ + /* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */ return obj; } diff --git a/gcc/testsuite/obj-c++.dg/method-15.mm b/gcc/testsuite/obj-c++.dg/method-15.mm index 055e8ca0c9b..860aad63eab 100644 --- a/gcc/testsuite/obj-c++.dg/method-15.mm +++ b/gcc/testsuite/obj-c++.dg/method-15.mm @@ -32,9 +32,9 @@ { NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data]; /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */ - /* { dg-warning "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(id \\)data." "" { target *-*-* } 17 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */ + /* { dg-message "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(id \\)data." "" { target *-*-* } 17 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */ /* 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 *-*-* } 33 } */ diff --git a/gcc/testsuite/obj-c++.dg/method-16.mm b/gcc/testsuite/obj-c++.dg/method-16.mm index f4a9efcd72c..aceefcdc7b0 100644 --- a/gcc/testsuite/obj-c++.dg/method-16.mm +++ b/gcc/testsuite/obj-c++.dg/method-16.mm @@ -25,9 +25,9 @@ void foo(void) { id obj1, obj2 = 0; obj2 = [obj1 initWithData: obj2]; /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 26 } */ - /* { dg-warning "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */ - /* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */ + /* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */ + /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */ /* The following error is a consequence of picking the "wrong" method signature. */ /* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } 26 } */ diff --git a/gcc/testsuite/obj-c++.dg/method-4.mm b/gcc/testsuite/obj-c++.dg/method-4.mm index 1d8d7ea4607..e94f8f1b770 100644 --- a/gcc/testsuite/obj-c++.dg/method-4.mm +++ b/gcc/testsuite/obj-c++.dg/method-4.mm @@ -7,13 +7,13 @@ #include @interface Base -- (id) meth1: (Base *)arg1; /* { dg-warning "using .\\-\\(id\\)meth1:\\(Base \\*\\)arg1." } */ -- (id) window; /* { dg-warning "using .\\-\\(id\\)window" } */ +- (id) meth1: (Base *)arg1; /* { dg-message "using .\\-\\(id\\)meth1:\\(Base \\*\\)arg1." } */ +- (id) window; /* { dg-message "using .\\-\\(id\\)window" } */ @end @interface Derived: Base -- (id) meth1: (Derived *)arg1; /* { dg-warning "also found .\\-\\(id\\)meth1:\\(Derived \\*\\)arg1." } */ -- (Base *) window; /* { dg-warning "also found .\\-\\(Base \\*\\)window." } */ +- (id) meth1: (Derived *)arg1; /* { dg-message "also found .\\-\\(id\\)meth1:\\(Derived \\*\\)arg1." } */ +- (Base *) window; /* { dg-message "also found .\\-\\(Base \\*\\)window." } */ @end void foo(void) { diff --git a/gcc/testsuite/obj-c++.dg/method-8.mm b/gcc/testsuite/obj-c++.dg/method-8.mm index 11ec1751bb9..9857c63ffe0 100644 --- a/gcc/testsuite/obj-c++.dg/method-8.mm +++ b/gcc/testsuite/obj-c++.dg/method-8.mm @@ -2,12 +2,12 @@ /* { dg-do compile } */ @interface class1 -- (int) meth1; /* { dg-error "previous declaration" } */ +- (int) meth1; /* { dg-message "previous declaration" } */ - (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */ @end @interface class2 -+ (void) meth1; /* { dg-error "previous declaration" } */ ++ (void) meth1; /* { dg-message "previous declaration" } */ + (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */ @end diff --git a/gcc/testsuite/obj-c++.dg/method-conflict-1.mm b/gcc/testsuite/obj-c++.dg/method-conflict-1.mm index 9073125ee61..2cc96e4fd08 100644 --- a/gcc/testsuite/obj-c++.dg/method-conflict-1.mm +++ b/gcc/testsuite/obj-c++.dg/method-conflict-1.mm @@ -7,17 +7,17 @@ with the same name but conflicting method signatures. */ @protocol MyProtocol -+ (int) method1: (int)x; /* { dg-error "previous declaration" } */ ++ (int) method1: (int)x; /* { dg-message "previous declaration" } */ + (float) method1: (int)x; /* { dg-error "duplicate declaration of method .\\+method1." } */ -- (int) method2: (int)x; /* { dg-error "previous declaration" } */ +- (int) method2: (int)x; /* { dg-message "previous declaration" } */ - (int) method2: (float)x; /* { dg-error "duplicate declaration of method .\\-method2." } */ @optional -+ (int *) method3: (int)x; /* { dg-error "previous declaration" } */ ++ (int *) method3: (int)x; /* { dg-message "previous declaration" } */ + (int *) method3: (int **)x; /* { dg-error "duplicate declaration of method .\\+method3." } */ -- (id) method4: (id)x; /* { dg-error "previous declaration" } */ +- (id) method4: (id)x; /* { dg-message "previous declaration" } */ - (void) method4: (id)x; /* { dg-error "duplicate declaration of method .\\-method4." } */ @end diff --git a/gcc/testsuite/obj-c++.dg/method-conflict-2.mm b/gcc/testsuite/obj-c++.dg/method-conflict-2.mm index ad6023d1af7..0b0612d771e 100644 --- a/gcc/testsuite/obj-c++.dg/method-conflict-2.mm +++ b/gcc/testsuite/obj-c++.dg/method-conflict-2.mm @@ -11,8 +11,8 @@ @protocol MyProtocol @optional -+ (void) method1: (id)x; /* { dg-error "previous declaration" } */ -- (id) method2: (long)x; /* { dg-error "previous declaration" } */ ++ (void) method1: (id)x; /* { dg-message "previous declaration" } */ +- (id) method2: (long)x; /* { dg-message "previous declaration" } */ @required + (void) method1: (id)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */ @@ -24,8 +24,8 @@ @protocol MyProtocol2 @required -+ (void) method3: (Class)x; /* { dg-error "previous declaration" } */ -- (id *) method4: (long)x; /* { dg-error "previous declaration" } */ ++ (void) method3: (Class)x; /* { dg-message "previous declaration" } */ +- (id *) method4: (long)x; /* { dg-message "previous declaration" } */ @optional + (void) method3: (Class)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */ diff --git a/gcc/testsuite/obj-c++.dg/method-conflict-3.mm b/gcc/testsuite/obj-c++.dg/method-conflict-3.mm index d4b6fbfd526..73e80c9482b 100644 --- a/gcc/testsuite/obj-c++.dg/method-conflict-3.mm +++ b/gcc/testsuite/obj-c++.dg/method-conflict-3.mm @@ -27,39 +27,37 @@ - (void) method6: (id )x; - (void) method6: (id )x; /* Ok */ -- (void) method7: (id)x; /* { dg-warning "previous declaration" } */ +- (void) method7: (id)x; /* { dg-message "previous declaration" } */ - (void) method7: (id )x; /* { dg-error "duplicate declaration" } */ -- (void) method8: (id )x; /* { dg-warning "previous declaration" } */ +- (void) method8: (id )x; /* { dg-message "previous declaration" } */ - (void) method8: (id)x; /* { dg-error "duplicate declaration" } */ -- (void) method9: (id )x; /* { dg-warning "previous declaration" } */ +- (void) method9: (id )x; /* { dg-message "previous declaration" } */ - (void) method9: (id )x; /* { dg-error "duplicate declaration" } */ -- (void) methodA: (id )x; /* { dg-warning "previous declaration" } */ +- (void) methodA: (id )x; /* { dg-message "previous declaration" } */ - (void) methodA: (id )x; /* { dg-error "duplicate declaration" } */ -/* FIXME: Bug in the testsuite - the following are done Ok by the compiler, but - the testsuite barfs so we have to comment out the tests. */ -/* - (void) methodB: (id )x; dg-warning "previous declaration" */ -/* - (void) methodB: (id )x; dg-error "duplicate declaration" */ +- (void) methodB: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodB: (id )x; /* { dg-error "duplicate declaration" } */ -/* - (void) methodC: (id )x; dg-warning "previous declaration" */ -/* - (void) methodC: (id )x; dg-error "duplicate declaration" */ +- (void) methodC: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodC: (id )x; /* { dg-error "duplicate declaration" } */ -/* - (void) methodD: (id )x; dg-warning "previous declaration" */ -/* - (void) methodD: (id )x; dg-error "duplicate declaration" */ +- (void) methodD: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodD: (id )x; /* { dg-error "duplicate declaration" } */ -/* - (void) methodE: (MyClass *)x; dg-warning "previous declaration" */ -/* - (void) methodE: (MyClass *)x; dg-error "duplicate declaration" */ +- (void) methodE: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodE: (MyClass *)x; /* { dg-error "duplicate declaration" } */ - (void) methodF: (MyClass *)x; - (void) methodF: (MyClass *)x; /* Ok */ -/* - (void) methodG: (MyClass *)x; dg-warning "previous declaration" */ -/* - (void) methodG: (MyClass *)x; dg-error "duplicate declaration" */ +- (void) methodG: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodG: (MyClass *)x; /* { dg-error "duplicate declaration" } */ -/* - (void) methodH: (MyClass *)x; dg-warning "previous declaration" */ -/* - (void) methodH: (MyClass *)x; dg-error "duplicate declaration" */ +- (void) methodH: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodH: (MyClass *)x; /* { dg-error "duplicate declaration" } */ @end diff --git a/gcc/testsuite/obj-c++.dg/method-conflict-4.mm b/gcc/testsuite/obj-c++.dg/method-conflict-4.mm index 103134116e2..e2aca6cc51c 100644 --- a/gcc/testsuite/obj-c++.dg/method-conflict-4.mm +++ b/gcc/testsuite/obj-c++.dg/method-conflict-4.mm @@ -21,10 +21,10 @@ @end @interface MyClass2 -- (void) aMethod: (id )x; /* { dg-error "previous declaration" } */ +- (void) aMethod: (id )x; /* { dg-message "previous declaration" } */ - (void) aMethod: (id )x; /* { dg-error "duplicate declaration" } */ -- (void) bMethod: (id )x; /* { dg-error "previous declaration" } */ +- (void) bMethod: (id )x; /* { dg-message "previous declaration" } */ - (void) bMethod: (id )x; /* { dg-error "duplicate declaration" } */ - (void) cMethod: (id )x; @@ -33,16 +33,15 @@ - (void) dMethod: (id )x; - (void) dMethod: (id )x; /* Ok */ -/* FIXME: The compiler works, but the testsuite produces errors anyway. */ -/* - (void) eMethod: (id )x; dg-error "previous declaration" */ -/* - (void) eMethod: (id )x; dg-error "duplicate declaration" */ +- (void) eMethod: (id )x; /* { dg-message "previous declaration" } */ +- (void) eMethod: (id )x; /* { dg-error "duplicate declaration" } */ -/*- (void) fMethod: (id )x; dg-error "previous declaration" */ -/*- (void) fMethod: (id )x; dg-error "duplicate declaration" */ +- (void) fMethod: (id )x; /* { dg-message "previous declaration" } */ +- (void) fMethod: (id )x; /* { dg-error "duplicate declaration" } */ -/* - (void) gMethod: (id )x; dg-error "previous declaration" */ -/* - (void) gMethod: (id )x; dg-error "duplicate declaration" */ +- (void) gMethod: (id )x; /* { dg-message "previous declaration" } */ +- (void) gMethod: (id )x; /* { dg-error "duplicate declaration" } */ -/* - (void) hMethod: (id )x; dg-error "previous declaration" */ -/* - (void) hMethod: (id )x; dg-error "duplicate declaration" */ +- (void) hMethod: (id )x; /* { dg-message "previous declaration" } */ +- (void) hMethod: (id )x; /* { dg-error "duplicate declaration" } */ @end diff --git a/gcc/testsuite/obj-c++.dg/private-1.mm b/gcc/testsuite/obj-c++.dg/private-1.mm index cd423b55127..0c25aea5566 100644 --- a/gcc/testsuite/obj-c++.dg/private-1.mm +++ b/gcc/testsuite/obj-c++.dg/private-1.mm @@ -49,8 +49,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 */ } diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-14.mm b/gcc/testsuite/obj-c++.dg/property/at-property-14.mm index 33744ebfa93..a9068ba89d7 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-14.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-14.mm @@ -10,11 +10,11 @@ /* Test the warnings on 'assign'. */ @property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ - /* { dg-warning ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 12 } */ + /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 12 } */ @property (readonly) id property_b; /* No 'assign' warning (assign semantics do not matter if the property is readonly). */ @property id *property_c; /* No 'assign' warning (the type is not an Objective-C object). */ @property Class property_d; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */ @property MyRootClass *property_e; /* { dg-warning "object property .property.e. has no .assign., .retain. or .copy. attribute" } */ - /* { dg-warning ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 18 } */ + /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 18 } */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-16.mm b/gcc/testsuite/obj-c++.dg/property/at-property-16.mm index 2639de9e667..6a9856b9027 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-16.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-16.mm @@ -10,16 +10,15 @@ { Class isa; } -@property (assign) id a; /* { dg-warning "originally specified here" } */ -@property (retain) id b; /* { dg-warning "originally specified here" } */ -@property int c; /* { dg-warning "originally specified here" } */ -@property (nonatomic) int d; /* { dg-warning "originally specified here" } */ -/* FIXME: Mysteriously the next 3 need to be 'dg-message' instead of 'dg-warning' for the testcase to work. */ +@property (assign) id a; /* { dg-message "originally specified here" } */ +@property (retain) id b; /* { dg-message "originally specified here" } */ +@property int c; /* { dg-message "originally specified here" } */ +@property (nonatomic) int d; /* { dg-message "originally specified here" } */ @property int e; /* { dg-message "originally specified here" } */ @property int f; /* { dg-message "originally specified here" } */ @property int g; /* { dg-message "originally specified here" } */ @property (readonly) int h; /* Ok */ -@property (readonly,getter=getMe) int i; /* { dg-warning "originally specified here" } */ +@property (readonly,getter=getMe) int i; /* { dg-message "originally specified here" } */ @end @interface MyClass : MyRootClass diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-18.mm b/gcc/testsuite/obj-c++.dg/property/at-property-18.mm index 72abb6b76b5..d318210986d 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-18.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-18.mm @@ -26,21 +26,21 @@ @end @interface MyRootClass (Category) @property (retain) id a; /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 16 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 16 } */ @property (assign) id b; /* { dg-warning "assign semantics attributes of property .b. conflict with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 17 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 17 } */ @property (nonatomic) int c; /* { dg-warning ".nonatomic. attribute of property .c. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 18 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 18 } */ @property int d; /* { dg-warning ".nonatomic. attribute of property .d. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 19 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 19 } */ @property (setter=setX:) int e; /* { dg-warning ".setter. attribute of property .e. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 20 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 20 } */ @property (getter=x) int f; /* { dg-warning ".getter. attribute of property .f. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 21 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 21 } */ @property (readonly) int g; /* { dg-warning ".readonly. attribute of property .g. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 22 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 22 } */ @property (readwrite) int h; /* Ok */ @property (readonly) int i; /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 24 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 24 } */ @property (nonatomic) float j; /* Ok */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-20.mm b/gcc/testsuite/obj-c++.dg/property/at-property-20.mm index 077fe6ddda2..85f5aecd15d 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-20.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-20.mm @@ -37,14 +37,13 @@ @interface MyClass : MyRootClass { } -@property (assign) id a; /* { dg-warning "originally specified here" } */ -@property int b; /* { dg-warning "originally specified here" } */ -@property float c; /* { dg-warning "originally specified here" } */ -@property (assign) MyRootClass *d; /* { dg-warning "originally specified here" } */ -@property (assign) MySubClass1 *e; /* { dg-warning "originally specified here" } */ -/* FIXME: Mysteriously two of the next three need to be 'dg-message' instead of 'dg-warning' for the testcase to work. */ +@property (assign) id a; /* { dg-message "originally specified here" } */ +@property int b; /* { dg-message "originally specified here" } */ +@property float c; /* { dg-message "originally specified here" } */ +@property (assign) MyRootClass *d; /* { dg-message "originally specified here" } */ +@property (assign) MySubClass1 *e; /* { dg-message "originally specified here" } */ @property (assign, readonly) MySubClass1 *f; /* { dg-message "originally specified here" } */ -@property (assign) MySubClass3 *g; /* { dg-warning "originally specified here" } */ +@property (assign) MySubClass3 *g; /* { dg-message "originally specified here" } */ @property (assign, readonly) MySubClass3 *h; /* { dg-message "originally specified here" } */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-21.mm b/gcc/testsuite/obj-c++.dg/property/at-property-21.mm index 6106b7ee2aa..d1f54b1cda8 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-21.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-21.mm @@ -14,10 +14,10 @@ /* Test the warnings on 'assign' with protocols. */ @property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ - /* { dg-warning ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 16 } */ + /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 16 } */ @property MyRootClass *property_b; /* { dg-warning "object property .property.b. has no .assign., .retain. or .copy. attribute" } */ - /* { dg-warning ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 19 } */ + /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 19 } */ @property Class property_c; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-28.mm b/gcc/testsuite/obj-c++.dg/property/at-property-28.mm index 23b357c8505..de5122443c6 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-28.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-28.mm @@ -10,11 +10,11 @@ { Class isa; } -@property (readonly, retain) id property1; /* { dg-warning "originally specified here" } */ -@property (readonly) int property2; /* { dg-warning "originally specified here" } */ -@property (readonly, getter=y) int property3; /* { dg-warning "originally specified here" } */ +@property (readonly, retain) id property1; /* { dg-message "originally specified here" } */ +@property (readonly) int property2; /* { dg-message "originally specified here" } */ +@property (readonly, getter=y) int property3; /* { dg-message "originally specified here" } */ @property (readonly) int property4; /* Ok */ -@property (readonly) int property5; /* { dg-warning "originally specified here" } */ +@property (readonly) int property5; /* { dg-message "originally specified here" } */ @end @interface MyRootClass () diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-5.mm b/gcc/testsuite/obj-c++.dg/property/at-property-5.mm index 92dd114c879..fc618f2bc55 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-5.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-5.mm @@ -18,7 +18,7 @@ /* Test various error messages. */ @property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ - /* { dg-warning ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 20 } */ + /* { dg-message ".assign. can be unsafe for Objective-C objects" "" { target *-*-* } 20 } */ @property int property_b = 4; /* { dg-error "expected" } */ @property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */ @property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */ @@ -28,7 +28,7 @@ @property (retain) id property_g; @property (retain) id property_h; @property (retain) id property_e; /* { dg-error "redeclaration of property .property_e." } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 26 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 26 } */ @end @property id test; /* { dg-error "misplaced .@property. Objective-C.. construct" } */ diff --git a/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm b/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm index 39ef6b2b7d7..49004eff495 100644 --- a/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm +++ b/gcc/testsuite/obj-c++.dg/property/dynamic-2.mm @@ -40,6 +40,6 @@ @implementation AnotherTest @dynamic one; @dynamic one; /* { dg-error "property .one. already specified in .@dynamic." } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 41 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 41 } */ @dynamic three; /* { dg-error "no declaration of property .three. found in the interface" } */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm b/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm index a298bf01572..0b30931a881 100644 --- a/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm +++ b/gcc/testsuite/obj-c++.dg/property/property-neg-3.mm @@ -10,5 +10,5 @@ @implementation Person @dynamic firstName; @synthesize firstName; /* { dg-error "property .firstName. already specified in .@dynamic." } */ - /* { dg-warning "originally specified here" "" { target *-*-* } 11 } */ + /* { dg-message "originally specified here" "" { target *-*-* } 11 } */ @end diff --git a/gcc/testsuite/obj-c++.dg/property/synthesize-11.mm b/gcc/testsuite/obj-c++.dg/property/synthesize-11.mm index 5d808d038f6..25158da761a 100644 --- a/gcc/testsuite/obj-c++.dg/property/synthesize-11.mm +++ b/gcc/testsuite/obj-c++.dg/property/synthesize-11.mm @@ -10,8 +10,8 @@ @interface MyRootClass { Class isa; - int countA : 2; /* { dg-warning "originally specified here" } */ - int countB : 3; /* { dg-warning "originally specified here" } */ + int countA : 2; /* { dg-message "originally specified here" } */ + int countB : 3; /* { dg-message "originally specified here" } */ } + (id) initialize; + (id) alloc; @@ -27,5 +27,5 @@ @synthesize countA; /* { dg-error ".atomic. property .countA. is using bit-field instance variable .countA." } */ @synthesize countB; /* { dg-error "property .countB. is using instance variable .countB. of incompatible type" } */ @end /* { dg-warning "incomplete implementation of class" } */ -/* { dg-warning "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */ -/* { dg-warning "method definition for ..countA. not found" "" { target *-*-* } 29 } */ +/* { dg-message "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */ +/* { dg-message "method definition for ..countA. not found" "" { target *-*-* } 29 } */ diff --git a/gcc/testsuite/obj-c++.dg/property/synthesize-6.mm b/gcc/testsuite/obj-c++.dg/property/synthesize-6.mm index f6f5293e41d..2a078c9b8a8 100644 --- a/gcc/testsuite/obj-c++.dg/property/synthesize-6.mm +++ b/gcc/testsuite/obj-c++.dg/property/synthesize-6.mm @@ -15,7 +15,7 @@ @property int v2; @end @implementation Test -@synthesize v1 = v; /* { dg-warning "originally specified here" } */ +@synthesize v1 = v; /* { dg-message "originally specified here" } */ @synthesize v2 = v; /* { dg-error "property .v2. is using the same instance variable as property .v1." } */ @end @interface Test2 : Test @@ -26,5 +26,5 @@ @synthesize w1; /* { dg-error "ivar .w1. used by .@synthesize. declaration must be an existing ivar" } */ @end /* { dg-warning "incomplete implementation" "" { target *-*-* } 27 } */ -/* { dg-warning "method definition for .-setW1:. not found" "" { target *-*-* } 27 } */ -/* { dg-warning "method definition for .-w1. not found" "" { target *-*-* } 27 } */ +/* { dg-message "method definition for .-setW1:. not found" "" { target *-*-* } 27 } */ +/* { dg-message "method definition for .-w1. not found" "" { target *-*-* } 27 } */ diff --git a/gcc/testsuite/obj-c++.dg/property/synthesize-8.mm b/gcc/testsuite/obj-c++.dg/property/synthesize-8.mm index 071f6f2ad2a..4af3ecc742f 100644 --- a/gcc/testsuite/obj-c++.dg/property/synthesize-8.mm +++ b/gcc/testsuite/obj-c++.dg/property/synthesize-8.mm @@ -52,13 +52,13 @@ /* This is not OK. */ @interface Test2 { - int v; /* { dg-warning "originally specified here" } */ - float w; /* { dg-warning "originally specified here" } */ - id x; /* { dg-warning "originally specified here" } */ - Test *y; /* { dg-warning "originally specified here" } */ - id *z; /* { dg-warning "originally specified here" } */ - ClassA *a; /* { dg-warning "originally specified here" } */ - ClassB *b; /* { dg-warning "originally specified here" } */ + int v; /* { dg-message "originally specified here" } */ + float w; /* { dg-message "originally specified here" } */ + id x; /* { dg-message "originally specified here" } */ + Test *y; /* { dg-message "originally specified here" } */ + id *z; /* { dg-message "originally specified here" } */ + ClassA *a; /* { dg-message "originally specified here" } */ + ClassB *b; /* { dg-message "originally specified here" } */ } @property (assign) float v; @property (assign) id w; diff --git a/gcc/testsuite/obj-c++.dg/property/synthesize-9.mm b/gcc/testsuite/obj-c++.dg/property/synthesize-9.mm index bcf195f9015..7eae31d3f4d 100644 --- a/gcc/testsuite/obj-c++.dg/property/synthesize-9.mm +++ b/gcc/testsuite/obj-c++.dg/property/synthesize-9.mm @@ -52,12 +52,12 @@ /* This is sometimes OK, sometimes not OK. */ @interface Test2 { - int v; /* { dg-warning "originally specified here" } */ - float w; /* { dg-warning "originally specified here" } */ - id x; /* { dg-warning "originally specified here" } */ + int v; /* { dg-message "originally specified here" } */ + float w; /* { dg-message "originally specified here" } */ + id x; /* { dg-message "originally specified here" } */ Test *y; - id *z; /* { dg-warning "originally specified here" } */ - ClassA *a; /* { dg-warning "originally specified here" } */ + id *z; /* { dg-message "originally specified here" } */ + ClassA *a; /* { dg-message "originally specified here" } */ ClassB *b; } @property (assign, readonly) float v; diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-4.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-4.mm index a5092a11a62..9f94754ca07 100644 --- a/gcc/testsuite/obj-c++.dg/proto-lossage-4.mm +++ b/gcc/testsuite/obj-c++.dg/proto-lossage-4.mm @@ -40,7 +40,7 @@ long foo(void) { receiver += [objrcvr2 someValue]; receiver += [objrcvr2 anotherValue]; receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */ -/* { dg-warning "invalid conversion" "" { target *-*-* } 42 } */ +/* { dg-error "invalid conversion" "" { target *-*-* } 42 } */ receiver += [(Obj *)objrcvr2 anotherValue]; diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-7.mm b/gcc/testsuite/obj-c++.dg/syntax-error-7.mm index eef5bc75c62..e38c0958cc3 100644 --- a/gcc/testsuite/obj-c++.dg/syntax-error-7.mm +++ b/gcc/testsuite/obj-c++.dg/syntax-error-7.mm @@ -9,5 +9,5 @@ -(void) someMethod /* { dg-error "expected before .-." } */ { } -@end /* { dg-error "incomplete implementation of class" } */ -/* { dg-error "method definition for ..someMethod. not found" "" { target *-*-* } 12 } */ +@end /* { dg-warning "incomplete implementation of class" } */ +/* { dg-warning "method definition for ..someMethod. not found" "" { target *-*-* } 12 } */ diff --git a/gcc/testsuite/obj-c++.dg/tls/diag-5.mm b/gcc/testsuite/obj-c++.dg/tls/diag-5.mm index 07ecd3f7da0..413d107f24d 100644 --- a/gcc/testsuite/obj-c++.dg/tls/diag-5.mm +++ b/gcc/testsuite/obj-c++.dg/tls/diag-5.mm @@ -1,4 +1,4 @@ /* __thread specifiers on empty declarations. */ /* { dg-require-effective-target tls } */ -__thread struct foo; /* { dg-warning "qualifiers can only be specified for objects and functions" } */ +__thread struct foo; /* { dg-error "qualifiers can only be specified for objects and functions" } */ diff --git a/gcc/testsuite/obj-c++.dg/warn5.mm b/gcc/testsuite/obj-c++.dg/warn5.mm index b46daed77fd..5f9b7a7f76d 100644 --- a/gcc/testsuite/obj-c++.dg/warn5.mm +++ b/gcc/testsuite/obj-c++.dg/warn5.mm @@ -16,10 +16,10 @@ struct A { typedef void (A::*pmf)(); -static int mememe = &A::foo - &A::bar; // { dg-warning "" } -pmf b = &A::foo-1; // { dg-warning "" } +static int mememe = &A::foo - &A::bar; // { dg-error "" } +pmf b = &A::foo-1; // { dg-error "" } int main() { double y; - y=X(Y-Z); // { dg-warning "" } + y=X(Y-Z); // { dg-error "" } }