Commit 81dc6eea by Nicola Pero Committed by Nicola Pero

In gcc/testsuite/: 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>

In gcc/testsuite/:
2011-01-12  Nicola Pero  <nicola.pero@meta-innovation.com>

	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
parent d853ee42
2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com> 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
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 <nicola.pero@meta-innovation.com>
* objc.dg/property/at-property-29.m: New. * objc.dg/property/at-property-29.m: New.
* obj-c++.dg/property/at-property-29.mm: New. * obj-c++.dg/property/at-property-29.mm: New.
......
...@@ -211,6 +211,8 @@ proc obj-c++_init { args } { ...@@ -211,6 +211,8 @@ proc obj-c++_init { args } {
global OBJCXX_UNDER_TEST global OBJCXX_UNDER_TEST
global TESTING_IN_BUILD_TREE global TESTING_IN_BUILD_TREE
global target_triplet global target_triplet
global gcc_warning_prefix
global gcc_error_prefix
if ![info exists OBJCXX_UNDER_TEST] then { if ![info exists OBJCXX_UNDER_TEST] then {
if [info exists TOOL_EXECUTABLE] { if [info exists TOOL_EXECUTABLE] {
...@@ -265,6 +267,9 @@ proc obj-c++_init { args } { ...@@ -265,6 +267,9 @@ proc obj-c++_init { args } {
# error-message parsing machinery. # error-message parsing machinery.
lappend ALWAYS_OBJCXXFLAGS "additional_flags=-fmessage-length=0" lappend ALWAYS_OBJCXXFLAGS "additional_flags=-fmessage-length=0"
set gcc_warning_prefix "warning:"
set gcc_error_prefix "error:"
if { [string match "*-*-darwin*" $target_triplet] } { if { [string match "*-*-darwin*" $target_triplet] } {
lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress" lappend ALWAYS_OBJCXXFLAGS "ldflags=-multiply_defined suppress"
} }
......
...@@ -20,7 +20,7 @@ __attribute__ ((deprecated("no dep_categ"))) ...@@ -20,7 +20,7 @@ __attribute__ ((deprecated("no dep_categ")))
@end @end
__attribute__ ((deprecated)) __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; } - (int) depmth { return var + 1; }
@end @end
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
Class isa; Class isa;
int count; int count;
} }
- (int) test; /* { dg-warning "previous declaration" } */ - (int) test; /* { dg-message "previous declaration" } */
@property int count; /* { dg-warning "originally specified here" } */ @property int count; /* { dg-message "originally specified here" } */
@end @end
@interface MyObject () @interface MyObject ()
......
...@@ -326,8 +326,8 @@ testComptypes(void) ...@@ -326,8 +326,8 @@ testComptypes(void)
objP1 == cls; /* { dg-warning "lacks a cast" } */ objP1 == cls; /* { dg-warning "lacks a cast" } */
} }
{ /* id <protocol>, non-ObjC */ { /* id <protocol>, non-ObjC */
num == objP1; /* { dg-warning "between pointer" } */ num == objP1; /* { dg-error "between pointer" } */
objP1 == num; /* { dg-warning "between pointer" } */ objP1 == num; /* { dg-error "between pointer" } */
ptr == objP1; ptr == objP1;
objP1 == ptr; objP1 == ptr;
...@@ -352,8 +352,8 @@ testComptypes(void) ...@@ -352,8 +352,8 @@ testComptypes(void)
clsP1 == cls; clsP1 == cls;
} }
{ /* Class <protocol>, non-ObjC */ { /* Class <protocol>, non-ObjC */
num == clsP1; /* { dg-warning "between pointer" } */ num == clsP1; /* { dg-error "between pointer" } */
clsP1 == num; /* { dg-warning "between pointer" } */ clsP1 == num; /* { dg-error "between pointer" } */
ptr == clsP1; ptr == clsP1;
clsP1 == ptr; clsP1 == ptr;
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
@end @end
int main(void) { 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 = [iostream new];
i = [std::basic_string<char> new]; /* { dg-warning "not an Objective\\-C class name or alias" } */ i = [std::basic_string<char> new]; /* { dg-error "not an Objective\\-C class name or alias" } */
return 0; return 0;
} }
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
@interface Test : Object @interface Test : Object
{ float j; } { float j; }
-(void) test2: (int [5])a with: (int [])b; -(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 @end
@implementation Test @implementation Test
......
...@@ -71,9 +71,9 @@ int test (id object) ...@@ -71,9 +71,9 @@ int test (id object)
@try { @throw object; } @try { @throw object; }
@catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ @catch (MyObject x) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
{ /* { dg-error "no matching function" "" { target *-*-* } 72 } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */
dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
} /* { dg-warning "candidate" "" { target *-*-* } 13 } */ } /* { dg-message "candidate" "" { target *-*-* } 13 } */
/* { dg-warning "candidate" "" { target *-*-* } 72 } */ /* { dg-message "candidates" "" { target *-*-* } 72 } */
@try { @throw object; } @try { @throw object; }
@catch (static MyObject *x) /* { dg-error "storage class" } */ @catch (static MyObject *x) /* { dg-error "storage class" } */
{ {
......
...@@ -71,9 +71,9 @@ int test (id object) ...@@ -71,9 +71,9 @@ int test (id object)
@try { @throw object; } @try { @throw object; }
@catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */ @catch (MyObject) /* { dg-error "@catch parameter is not a known Objective-C class type" } */
{ /* { dg-error "no matching function" "" { target *-*-* } 72 } */ { /* { dg-error "no matching function" "" { target *-*-* } 72 } */
dummy++; /* { dg-warning "MyObject" "" { target *-*-* } 13 } */ dummy++; /* { dg-message "MyObject" "" { target *-*-* } 13 } */
} /* { dg-warning "candidate" "" { target *-*-* } 13 } */ } /* { dg-message "candidate" "" { target *-*-* } 13 } */
/* { dg-warning "candidate" "" { target *-*-* } 72 } */ /* { dg-message "candidate" "" { target *-*-* } 72 } */
@try { @throw object; } @try { @throw object; }
@catch (static MyObject *) /* { dg-error "storage class" } */ @catch (static MyObject *) /* { dg-error "storage class" } */
......
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
static int c; /* { dg-error "invalid type" } */ static int c; /* { dg-error "invalid type" } */
inline int d; /* { dg-error "declared as an .inline." } */ inline int d; /* { dg-error "declared as an .inline." } */
typedef int e; /* { dg-error "invalid type" } */ 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 @end
...@@ -19,8 +19,8 @@ void foo(void) { ...@@ -19,8 +19,8 @@ void foo(void) {
Class receiver; Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */ [receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
/* { dg-warning "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */
/* { dg-warning "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */ [receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
/* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */
......
...@@ -20,8 +20,8 @@ id foo(void) { ...@@ -20,8 +20,8 @@ id foo(void) {
/* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 18 } */
/* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 18 } */
[obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */ [obj2 setWindow:nil]; /* { dg-warning "multiple methods named .\\-setWindow:. found" } */
/* { dg-warning "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */ /* { dg-message "using .\\-\\(void\\)setWindow:\\(Object \\*\\)wdw." "" { target *-*-* } 8 } */
/* { dg-warning "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */ /* { dg-message "also found .\\-\\(void\\)setWindow:\\(Class1 \\*\\)window." "" { target *-*-* } 12 } */
return obj; return obj;
} }
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
{ {
NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data]; NTGridDataObject *result = [[NTGridDataObject alloc] initWithData:data];
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 33 } */
/* { dg-warning "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */ /* { dg-message "using .\\-\\(id\\)initWithData:\\(Object \\*\\)data." "" { target *-*-* } 9 } */
/* { dg-warning "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */ /* { dg-message "also found .\\-\\(id\\)initWithData:\\(id <MyObject, MyCoding>\\)data." "" { target *-*-* } 17 } */
/* { dg-warning "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */ /* { dg-message "also found .\\-\\(id\\)initWithData:\\(int\\)data." "" { target *-*-* } 13 } */
/* The following warning is a consequence of picking the "wrong" method signature. */ /* 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 } */ /* { dg-warning "passing argument 1 of .initWithData:. from distinct Objective\\-C type" "" { target *-*-* } 33 } */
......
...@@ -25,9 +25,9 @@ void foo(void) { ...@@ -25,9 +25,9 @@ void foo(void) {
id obj1, obj2 = 0; id obj1, obj2 = 0;
obj2 = [obj1 initWithData: obj2]; obj2 = [obj1 initWithData: obj2];
/* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 26 } */ /* { dg-warning "multiple methods named .\\-initWithData:. found" "" { target *-*-* } 26 } */
/* { dg-warning "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */ /* { dg-message "using .\\-\\(void\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 13 } */
/* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */ /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object1 \\*\\)data." "" { target *-*-* } 17 } */
/* { dg-warning "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */ /* { dg-message "also found .\\-\\(id\\)initWithData:\\(Object2 \\*\\)data." "" { target *-*-* } 21 } */
/* The following error is a consequence of picking the "wrong" method signature. */ /* 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 } */ /* { dg-error "void value not ignored as it ought to be" "" { target *-*-* } 26 } */
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
#include <objc/objc.h> #include <objc/objc.h>
@interface Base @interface Base
- (id) meth1: (Base *)arg1; /* { dg-warning "using .\\-\\(id\\)meth1:\\(Base \\*\\)arg1." } */ - (id) meth1: (Base *)arg1; /* { dg-message "using .\\-\\(id\\)meth1:\\(Base \\*\\)arg1." } */
- (id) window; /* { dg-warning "using .\\-\\(id\\)window" } */ - (id) window; /* { dg-message "using .\\-\\(id\\)window" } */
@end @end
@interface Derived: Base @interface Derived: Base
- (id) meth1: (Derived *)arg1; /* { dg-warning "also found .\\-\\(id\\)meth1:\\(Derived \\*\\)arg1." } */ - (id) meth1: (Derived *)arg1; /* { dg-message "also found .\\-\\(id\\)meth1:\\(Derived \\*\\)arg1." } */
- (Base *) window; /* { dg-warning "also found .\\-\\(Base \\*\\)window." } */ - (Base *) window; /* { dg-message "also found .\\-\\(Base \\*\\)window." } */
@end @end
void foo(void) { void foo(void) {
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
/* { dg-do compile } */ /* { dg-do compile } */
@interface class1 @interface class1
- (int) meth1; /* { dg-error "previous declaration" } */ - (int) meth1; /* { dg-message "previous declaration" } */
- (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */ - (void) meth1; /* { dg-error "duplicate declaration of method .\\-meth1." } */
@end @end
@interface class2 @interface class2
+ (void) meth1; /* { dg-error "previous declaration" } */ + (void) meth1; /* { dg-message "previous declaration" } */
+ (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */ + (int) meth1; /* { dg-error "duplicate declaration of method .\\+meth1." } */
@end @end
......
...@@ -7,17 +7,17 @@ ...@@ -7,17 +7,17 @@
with the same name but conflicting method signatures. */ with the same name but conflicting method signatures. */
@protocol MyProtocol @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." } */ + (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." } */ - (int) method2: (float)x; /* { dg-error "duplicate declaration of method .\\-method2." } */
@optional @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." } */ + (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." } */ - (void) method4: (id)x; /* { dg-error "duplicate declaration of method .\\-method4." } */
@end @end
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
@protocol MyProtocol @protocol MyProtocol
@optional @optional
+ (void) method1: (id)x; /* { dg-error "previous declaration" } */ + (void) method1: (id)x; /* { dg-message "previous declaration" } */
- (id) method2: (long)x; /* { dg-error "previous declaration" } */ - (id) method2: (long)x; /* { dg-message "previous declaration" } */
@required @required
+ (void) method1: (id)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */ + (void) method1: (id)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
@protocol MyProtocol2 @protocol MyProtocol2
@required @required
+ (void) method3: (Class)x; /* { dg-error "previous declaration" } */ + (void) method3: (Class)x; /* { dg-message "previous declaration" } */
- (id *) method4: (long)x; /* { dg-error "previous declaration" } */ - (id *) method4: (long)x; /* { dg-message "previous declaration" } */
@optional @optional
+ (void) method3: (Class)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */ + (void) method3: (Class)x; /* { dg-error "declared .@optional. and .@required. at the same time" } */
......
...@@ -27,39 +27,37 @@ ...@@ -27,39 +27,37 @@
- (void) method6: (id <A, A, B, B, C, C>)x; - (void) method6: (id <A, A, B, B, C, C>)x;
- (void) method6: (id <C, A, B>)x; /* Ok */ - (void) method6: (id <C, A, B>)x; /* Ok */
- (void) method7: (id)x; /* { dg-warning "previous declaration" } */ - (void) method7: (id)x; /* { dg-message "previous declaration" } */
- (void) method7: (id <A>)x; /* { dg-error "duplicate declaration" } */ - (void) method7: (id <A>)x; /* { dg-error "duplicate declaration" } */
- (void) method8: (id <A>)x; /* { dg-warning "previous declaration" } */ - (void) method8: (id <A>)x; /* { dg-message "previous declaration" } */
- (void) method8: (id)x; /* { dg-error "duplicate declaration" } */ - (void) method8: (id)x; /* { dg-error "duplicate declaration" } */
- (void) method9: (id <A>)x; /* { dg-warning "previous declaration" } */ - (void) method9: (id <A>)x; /* { dg-message "previous declaration" } */
- (void) method9: (id <B>)x; /* { dg-error "duplicate declaration" } */ - (void) method9: (id <B>)x; /* { dg-error "duplicate declaration" } */
- (void) methodA: (id <A>)x; /* { dg-warning "previous declaration" } */ - (void) methodA: (id <A>)x; /* { dg-message "previous declaration" } */
- (void) methodA: (id <A, B>)x; /* { dg-error "duplicate declaration" } */ - (void) methodA: (id <A, B>)x; /* { dg-error "duplicate declaration" } */
/* FIXME: Bug in the testsuite - the following are done Ok by the compiler, but - (void) methodB: (id <A, B>)x; /* { dg-message "previous declaration" } */
the testsuite barfs so we have to comment out the tests. */ - (void) methodB: (id <A>)x; /* { dg-error "duplicate declaration" } */
/* - (void) methodB: (id <A, B>)x; dg-warning "previous declaration" */
/* - (void) methodB: (id <A>)x; dg-error "duplicate declaration" */
/* - (void) methodC: (id <A, B, C>)x; dg-warning "previous declaration" */ - (void) methodC: (id <A, B, C>)x; /* { dg-message "previous declaration" } */
/* - (void) methodC: (id <A, B>)x; dg-error "duplicate declaration" */ - (void) methodC: (id <A, B>)x; /* { dg-error "duplicate declaration" } */
/* - (void) methodD: (id <A, B, C>)x; dg-warning "previous declaration" */ - (void) methodD: (id <A, B, C>)x; /* { dg-message "previous declaration" } */
/* - (void) methodD: (id <A, B, A>)x; dg-error "duplicate declaration" */ - (void) methodD: (id <A, B, A>)x; /* { dg-error "duplicate declaration" } */
/* - (void) methodE: (MyClass <A, B, C> *)x; dg-warning "previous declaration" */ - (void) methodE: (MyClass <A, B, C> *)x; /* { dg-message "previous declaration" } */
/* - (void) methodE: (MyClass <A, B, A> *)x; dg-error "duplicate declaration" */ - (void) methodE: (MyClass <A, B, A> *)x; /* { dg-error "duplicate declaration" } */
- (void) methodF: (MyClass <A, B, A> *)x; - (void) methodF: (MyClass <A, B, A> *)x;
- (void) methodF: (MyClass <A, B, A> *)x; /* Ok */ - (void) methodF: (MyClass <A, B, A> *)x; /* Ok */
/* - (void) methodG: (MyClass *)x; dg-warning "previous declaration" */ - (void) methodG: (MyClass *)x; /* { dg-message "previous declaration" } */
/* - (void) methodG: (MyClass <A, B, C> *)x; dg-error "duplicate declaration" */ - (void) methodG: (MyClass <A, B, C> *)x; /* { dg-error "duplicate declaration" } */
/* - (void) methodH: (MyClass <A, C>*)x; dg-warning "previous declaration" */ - (void) methodH: (MyClass <A, C>*)x; /* { dg-message "previous declaration" } */
/* - (void) methodH: (MyClass *)x; dg-error "duplicate declaration" */ - (void) methodH: (MyClass *)x; /* { dg-error "duplicate declaration" } */
@end @end
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
@end @end
@interface MyClass2 @interface MyClass2
- (void) aMethod: (id <A>)x; /* { dg-error "previous declaration" } */ - (void) aMethod: (id <A>)x; /* { dg-message "previous declaration" } */
- (void) aMethod: (id <B>)x; /* { dg-error "duplicate declaration" } */ - (void) aMethod: (id <B>)x; /* { dg-error "duplicate declaration" } */
- (void) bMethod: (id <B>)x; /* { dg-error "previous declaration" } */ - (void) bMethod: (id <B>)x; /* { dg-message "previous declaration" } */
- (void) bMethod: (id <A>)x; /* { dg-error "duplicate declaration" } */ - (void) bMethod: (id <A>)x; /* { dg-error "duplicate declaration" } */
- (void) cMethod: (id <A, B>)x; - (void) cMethod: (id <A, B>)x;
...@@ -33,16 +33,15 @@ ...@@ -33,16 +33,15 @@
- (void) dMethod: (id <A, B>)x; - (void) dMethod: (id <A, B>)x;
- (void) dMethod: (id <B, A>)x; /* Ok */ - (void) dMethod: (id <B, A>)x; /* Ok */
/* FIXME: The compiler works, but the testsuite produces errors anyway. */ - (void) eMethod: (id <A>)x; /* { dg-message "previous declaration" } */
/* - (void) eMethod: (id <A>)x; dg-error "previous declaration" */ - (void) eMethod: (id <B, C>)x; /* { dg-error "duplicate declaration" } */
/* - (void) eMethod: (id <B, C>)x; dg-error "duplicate declaration" */
/*- (void) fMethod: (id <B, C>)x; dg-error "previous declaration" */ - (void) fMethod: (id <B, C>)x; /* { dg-message "previous declaration" } */
/*- (void) fMethod: (id <A>)x; dg-error "duplicate declaration" */ - (void) fMethod: (id <A>)x; /* { dg-error "duplicate declaration" } */
/* - (void) gMethod: (id <A>)x; dg-error "previous declaration" */ - (void) gMethod: (id <A>)x; /* { dg-message "previous declaration" } */
/* - (void) gMethod: (id <A, B, C>)x; dg-error "duplicate declaration" */ - (void) gMethod: (id <A, B, C>)x; /* { dg-error "duplicate declaration" } */
/* - (void) hMethod: (id <A, B, C>)x; dg-error "previous declaration" */ - (void) hMethod: (id <A, B, C>)x; /* { dg-message "previous declaration" } */
/* - (void) hMethod: (id <A>)x; dg-error "duplicate declaration" */ - (void) hMethod: (id <A>)x; /* { dg-error "duplicate declaration" } */
@end @end
...@@ -49,8 +49,8 @@ int main (void) ...@@ -49,8 +49,8 @@ int main (void)
{ {
int access; int access;
access = m->_private; /* { dg-error "is @private" } */ access = m->_private; /* { dg-warning "is @private" } */
access = m->_protected; /* { dg-error "is @protected" } */ access = m->_protected; /* { dg-warning "is @protected" } */
access = m->_public; /* Ok */ access = m->_public; /* Ok */
} }
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
/* Test the warnings on 'assign'. */ /* Test the warnings on 'assign'. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ @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 (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 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 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" } */ @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 @end
...@@ -10,16 +10,15 @@ ...@@ -10,16 +10,15 @@
{ {
Class isa; Class isa;
} }
@property (assign) id a; /* { dg-warning "originally specified here" } */ @property (assign) id a; /* { dg-message "originally specified here" } */
@property (retain) id b; /* { dg-warning "originally specified here" } */ @property (retain) id b; /* { dg-message "originally specified here" } */
@property int c; /* { dg-warning "originally specified here" } */ @property int c; /* { dg-message "originally specified here" } */
@property (nonatomic) int d; /* { dg-warning "originally specified here" } */ @property (nonatomic) int d; /* { dg-message "originally specified here" } */
/* FIXME: Mysteriously the next 3 need to be 'dg-message' instead of 'dg-warning' for the testcase to work. */
@property int e; /* { dg-message "originally specified here" } */ @property int e; /* { dg-message "originally specified here" } */
@property int f; /* { dg-message "originally specified here" } */ @property int f; /* { dg-message "originally specified here" } */
@property int g; /* { dg-message "originally specified here" } */ @property int g; /* { dg-message "originally specified here" } */
@property (readonly) int h; /* Ok */ @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 @end
@interface MyClass : MyRootClass @interface MyClass : MyRootClass
......
...@@ -26,21 +26,21 @@ ...@@ -26,21 +26,21 @@
@end @end
@interface MyRootClass (Category) @interface MyRootClass (Category)
@property (retain) id a; /* { dg-warning "assign semantics attributes of property .a. conflict with previous declaration" } */ @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" } */ @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" } */ @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" } */ @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" } */ @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" } */ @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" } */ @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 (readwrite) int h; /* Ok */
@property (readonly) int i; /* { dg-warning ".getter. attribute of property .i. conflicts with previous declaration" } */ @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 */ @property (nonatomic) float j; /* Ok */
@end @end
...@@ -37,14 +37,13 @@ ...@@ -37,14 +37,13 @@
@interface MyClass : MyRootClass @interface MyClass : MyRootClass
{ } { }
@property (assign) id <MyProtocolA> a; /* { dg-warning "originally specified here" } */ @property (assign) id <MyProtocolA> a; /* { dg-message "originally specified here" } */
@property int b; /* { dg-warning "originally specified here" } */ @property int b; /* { dg-message "originally specified here" } */
@property float c; /* { dg-warning "originally specified here" } */ @property float c; /* { dg-message "originally specified here" } */
@property (assign) MyRootClass *d; /* { dg-warning "originally specified here" } */ @property (assign) MyRootClass *d; /* { dg-message "originally specified here" } */
@property (assign) MySubClass1 *e; /* { dg-warning "originally specified here" } */ @property (assign) MySubClass1 *e; /* { dg-message "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, readonly) MySubClass1 *f; /* { 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" } */ @property (assign, readonly) MySubClass3 *h; /* { dg-message "originally specified here" } */
@end @end
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
/* Test the warnings on 'assign' with protocols. */ /* Test the warnings on 'assign' with protocols. */
@property id <MyProtocol> property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ @property id <MyProtocol> 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 <MyProtocol> *property_b; /* { dg-warning "object property .property.b. has no .assign., .retain. or .copy. attribute" } */ @property MyRootClass <MyProtocol> *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 <MyProtocol> property_c; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */ @property Class <MyProtocol> property_c; /* No 'assign' warning (Classes are static objects so assign semantics do not matter for them). */
@end @end
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
{ {
Class isa; Class isa;
} }
@property (readonly, retain) id property1; /* { dg-warning "originally specified here" } */ @property (readonly, retain) id property1; /* { dg-message "originally specified here" } */
@property (readonly) int property2; /* { dg-warning "originally specified here" } */ @property (readonly) int property2; /* { dg-message "originally specified here" } */
@property (readonly, getter=y) int property3; /* { dg-warning "originally specified here" } */ @property (readonly, getter=y) int property3; /* { dg-message "originally specified here" } */
@property (readonly) int property4; /* Ok */ @property (readonly) int property4; /* Ok */
@property (readonly) int property5; /* { dg-warning "originally specified here" } */ @property (readonly) int property5; /* { dg-message "originally specified here" } */
@end @end
@interface MyRootClass () @interface MyRootClass ()
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* Test various error messages. */ /* Test various error messages. */
@property id property_a; /* { dg-warning "object property .property.a. has no .assign., .retain. or .copy. attribute" } */ @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 int property_b = 4; /* { dg-error "expected" } */
@property (retain) int property_c; /* { dg-error ".retain. attribute is only valid for Objective-C objects" } */ @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" } */ @property (copy) int property_d; /* { dg-error ".copy. attribute is only valid for Objective-C objects" } */
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
@property (retain) id property_g; @property (retain) id property_g;
@property (retain) id property_h; @property (retain) id property_h;
@property (retain) id property_e; /* { dg-error "redeclaration of property .property_e." } */ @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 @end
@property id test; /* { dg-error "misplaced .@property. Objective-C.. construct" } */ @property id test; /* { dg-error "misplaced .@property. Objective-C.. construct" } */
...@@ -40,6 +40,6 @@ ...@@ -40,6 +40,6 @@
@implementation AnotherTest @implementation AnotherTest
@dynamic one; @dynamic one;
@dynamic one; /* { dg-error "property .one. already specified in .@dynamic." } */ @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" } */ @dynamic three; /* { dg-error "no declaration of property .three. found in the interface" } */
@end @end
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
@implementation Person @implementation Person
@dynamic firstName; @dynamic firstName;
@synthesize firstName; /* { dg-error "property .firstName. already specified in .@dynamic." } */ @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 @end
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
@interface MyRootClass @interface MyRootClass
{ {
Class isa; Class isa;
int countA : 2; /* { dg-warning "originally specified here" } */ int countA : 2; /* { dg-message "originally specified here" } */
int countB : 3; /* { dg-warning "originally specified here" } */ int countB : 3; /* { dg-message "originally specified here" } */
} }
+ (id) initialize; + (id) initialize;
+ (id) alloc; + (id) alloc;
...@@ -27,5 +27,5 @@ ...@@ -27,5 +27,5 @@
@synthesize countA; /* { dg-error ".atomic. property .countA. is using bit-field instance variable .countA." } */ @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" } */ @synthesize countB; /* { dg-error "property .countB. is using instance variable .countB. of incompatible type" } */
@end /* { dg-warning "incomplete implementation of class" } */ @end /* { dg-warning "incomplete implementation of class" } */
/* { dg-warning "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */ /* { dg-message "method definition for ..setCountA.. not found" "" { target *-*-* } 29 } */
/* { dg-warning "method definition for ..countA. not found" "" { target *-*-* } 29 } */ /* { dg-message "method definition for ..countA. not found" "" { target *-*-* } 29 } */
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
@property int v2; @property int v2;
@end @end
@implementation Test @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." } */ @synthesize v2 = v; /* { dg-error "property .v2. is using the same instance variable as property .v1." } */
@end @end
@interface Test2 : Test @interface Test2 : Test
...@@ -26,5 +26,5 @@ ...@@ -26,5 +26,5 @@
@synthesize w1; /* { dg-error "ivar .w1. used by .@synthesize. declaration must be an existing ivar" } */ @synthesize w1; /* { dg-error "ivar .w1. used by .@synthesize. declaration must be an existing ivar" } */
@end @end
/* { dg-warning "incomplete implementation" "" { target *-*-* } 27 } */ /* { dg-warning "incomplete implementation" "" { target *-*-* } 27 } */
/* { dg-warning "method definition for .-setW1:. not found" "" { target *-*-* } 27 } */ /* { dg-message "method definition for .-setW1:. not found" "" { target *-*-* } 27 } */
/* { dg-warning "method definition for .-w1. not found" "" { target *-*-* } 27 } */ /* { dg-message "method definition for .-w1. not found" "" { target *-*-* } 27 } */
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
/* This is not OK. */ /* This is not OK. */
@interface Test2 @interface Test2
{ {
int v; /* { dg-warning "originally specified here" } */ int v; /* { dg-message "originally specified here" } */
float w; /* { dg-warning "originally specified here" } */ float w; /* { dg-message "originally specified here" } */
id x; /* { dg-warning "originally specified here" } */ id x; /* { dg-message "originally specified here" } */
Test *y; /* { dg-warning "originally specified here" } */ Test *y; /* { dg-message "originally specified here" } */
id <MyProtocol> *z; /* { dg-warning "originally specified here" } */ id <MyProtocol> *z; /* { dg-message "originally specified here" } */
ClassA *a; /* { dg-warning "originally specified here" } */ ClassA *a; /* { dg-message "originally specified here" } */
ClassB *b; /* { dg-warning "originally specified here" } */ ClassB *b; /* { dg-message "originally specified here" } */
} }
@property (assign) float v; @property (assign) float v;
@property (assign) id w; @property (assign) id w;
......
...@@ -52,12 +52,12 @@ ...@@ -52,12 +52,12 @@
/* This is sometimes OK, sometimes not OK. */ /* This is sometimes OK, sometimes not OK. */
@interface Test2 @interface Test2
{ {
int v; /* { dg-warning "originally specified here" } */ int v; /* { dg-message "originally specified here" } */
float w; /* { dg-warning "originally specified here" } */ float w; /* { dg-message "originally specified here" } */
id x; /* { dg-warning "originally specified here" } */ id x; /* { dg-message "originally specified here" } */
Test *y; Test *y;
id <MyProtocol> *z; /* { dg-warning "originally specified here" } */ id <MyProtocol> *z; /* { dg-message "originally specified here" } */
ClassA *a; /* { dg-warning "originally specified here" } */ ClassA *a; /* { dg-message "originally specified here" } */
ClassB *b; ClassB *b;
} }
@property (assign, readonly) float v; @property (assign, readonly) float v;
......
...@@ -40,7 +40,7 @@ long foo(void) { ...@@ -40,7 +40,7 @@ long foo(void) {
receiver += [objrcvr2 someValue]; receiver += [objrcvr2 someValue];
receiver += [objrcvr2 anotherValue]; receiver += [objrcvr2 anotherValue];
receiver += [(Obj *)objrcvr2 someValue]; /* { dg-warning ".Obj. may not respond to .\\-someValue." } */ 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]; receiver += [(Obj *)objrcvr2 anotherValue];
......
...@@ -9,5 +9,5 @@ ...@@ -9,5 +9,5 @@
-(void) someMethod /* { dg-error "expected before .-." } */ -(void) someMethod /* { dg-error "expected before .-." } */
{ {
} }
@end /* { dg-error "incomplete implementation of class" } */ @end /* { dg-warning "incomplete implementation of class" } */
/* { dg-error "method definition for ..someMethod. not found" "" { target *-*-* } 12 } */ /* { dg-warning "method definition for ..someMethod. not found" "" { target *-*-* } 12 } */
/* __thread specifiers on empty declarations. */ /* __thread specifiers on empty declarations. */
/* { dg-require-effective-target tls } */ /* { 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" } */
...@@ -16,10 +16,10 @@ struct A { ...@@ -16,10 +16,10 @@ struct A {
typedef void (A::*pmf)(); typedef void (A::*pmf)();
static int mememe = &A::foo - &A::bar; // { dg-warning "" } static int mememe = &A::foo - &A::bar; // { dg-error "" }
pmf b = &A::foo-1; // { dg-warning "" } pmf b = &A::foo-1; // { dg-error "" }
int main() { int main() {
double y; double y;
y=X(Y-Z); // { dg-warning "" } y=X(Y-Z); // { dg-error "" }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment