In gcc/testsuite/: 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com>
authorNicola Pero <nicola.pero@meta-innovation.com>
Wed, 12 Jan 2011 09:46:56 +0000 (09:46 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Wed, 12 Jan 2011 09:46:56 +0000 (09:46 +0000)
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

38 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/lib/obj-c++.exp
gcc/testsuite/obj-c++.dg/attributes/categ-attribute-2.mm
gcc/testsuite/obj-c++.dg/class-extension-3.mm
gcc/testsuite/obj-c++.dg/class-protocol-1.mm
gcc/testsuite/obj-c++.dg/cxx-scope-2.mm
gcc/testsuite/obj-c++.dg/encode-7.mm
gcc/testsuite/obj-c++.dg/exceptions-3.mm
gcc/testsuite/obj-c++.dg/exceptions-5.mm
gcc/testsuite/obj-c++.dg/ivar-invalid-type-1.mm
gcc/testsuite/obj-c++.dg/method-12.mm
gcc/testsuite/obj-c++.dg/method-13.mm
gcc/testsuite/obj-c++.dg/method-15.mm
gcc/testsuite/obj-c++.dg/method-16.mm
gcc/testsuite/obj-c++.dg/method-4.mm
gcc/testsuite/obj-c++.dg/method-8.mm
gcc/testsuite/obj-c++.dg/method-conflict-1.mm
gcc/testsuite/obj-c++.dg/method-conflict-2.mm
gcc/testsuite/obj-c++.dg/method-conflict-3.mm
gcc/testsuite/obj-c++.dg/method-conflict-4.mm
gcc/testsuite/obj-c++.dg/private-1.mm
gcc/testsuite/obj-c++.dg/property/at-property-14.mm
gcc/testsuite/obj-c++.dg/property/at-property-16.mm
gcc/testsuite/obj-c++.dg/property/at-property-18.mm
gcc/testsuite/obj-c++.dg/property/at-property-20.mm
gcc/testsuite/obj-c++.dg/property/at-property-21.mm
gcc/testsuite/obj-c++.dg/property/at-property-28.mm
gcc/testsuite/obj-c++.dg/property/at-property-5.mm
gcc/testsuite/obj-c++.dg/property/dynamic-2.mm
gcc/testsuite/obj-c++.dg/property/property-neg-3.mm
gcc/testsuite/obj-c++.dg/property/synthesize-11.mm
gcc/testsuite/obj-c++.dg/property/synthesize-6.mm
gcc/testsuite/obj-c++.dg/property/synthesize-8.mm
gcc/testsuite/obj-c++.dg/property/synthesize-9.mm
gcc/testsuite/obj-c++.dg/proto-lossage-4.mm
gcc/testsuite/obj-c++.dg/syntax-error-7.mm
gcc/testsuite/obj-c++.dg/tls/diag-5.mm
gcc/testsuite/obj-c++.dg/warn5.mm

index 15ffa935e81a4be517f4a833132040ff6c16e548..3450fdf6b675e46821062e4c64589fa16082699d 100644 (file)
@@ -1,3 +1,52 @@
+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.
index a2020fa791425dfcc22a207b0aaec0dd963e245c..57bab524a32f31c63880eabb669386b0cfaab53c 100644 (file)
@@ -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"
     }
index 631607a0147f665fd3609db7dad7f07a74152200..d2fb78913847c9889717590c3ff93f474be09223 100644 (file)
@@ -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
 
index 1d9d11b684e817b02809b102234d22ec840130db..69e5705396989b4a739eed05f065f61c86664777 100644 (file)
@@ -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 ()
index 6391fda6f12b094d7aa2e60469940d3cb5517a88..2ab702a4dfb83a62c9640b5b5f8dfc7b321e1f1e 100644 (file)
@@ -326,8 +326,8 @@ testComptypes(void)
     objP1 == cls; /* { dg-warning "lacks a cast" } */
   }
   { /* id <protocol>, 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 <protocol>, 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;
index 21fed5085fc87a27d8a671b036d3b94bb89dd6e3..c793b282f39110833e5b0552c291d587abd07fd5 100644 (file)
@@ -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<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;
 }
index 40b1510bef0ae5715afef60373e6a448535e6300..523c7ce02e8678836c16d6904cbffb9db9cb0454 100644 (file)
@@ -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
index adae263790f08ec8018a9666b57a6116f4715363..bf0be018e0307d14d5858838efbe0cc0bea0d879 100644 (file)
@@ -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" } */
     {
index ba0e543e98af0fa5e34f538511496afd910f701e..1ea9a6f4610ec09f6d8cfbf8cb8733aa860434a3 100644 (file)
@@ -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" } */
index bd2094ade076321472e56c0d7baf91b1fd8b9e85..4c1480a6be998e7be45678a46072133e38449d86 100644 (file)
@@ -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
index e3620708a9df354fce5b0bef0a81226a7a54279f..7c6916b320df151e33118a2b9afe0690939bdb5f 100644 (file)
@@ -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 } */
index 18fb7cd3ae529fda35ed1606585e74d3bd3233f6..6938f7d349a26465158c419165a9056c53d46fbb 100644 (file)
@@ -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;
 }
index 055e8ca0c9bb6f93fc93ed6b75b5c6c00495a242..860aad63eabef75d48223338d3410919b8af1a93 100644 (file)
@@ -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 <MyObject, MyCoding>\\)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 <MyObject, MyCoding>\\)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 } */
index f4a9efcd72cd4de6b179f5a46491240fcb44024e..aceefcdc7b0c330286d85d664c42bfd95c22d936 100644 (file)
@@ -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 } */
index 1d8d7ea4607583e5dfed447174d1e44665e9f634..e94f8f1b77096c5ce35e48769c86dd6991f8352e 100644 (file)
@@ -7,13 +7,13 @@
 #include <objc/objc.h>
 
 @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) {
index 11ec1751bb963c5d98c946fb1e7052880a7db06b..9857c63ffe006ae163491d596b0ad67cd9267a76 100644 (file)
@@ -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
 
index 9073125ee61ab8e75183ce43098dee5a50d131b4..2cc96e4fd08ca9c913f624eb1217111ea4319fde 100644 (file)
@@ -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
 
index ad6023d1af71a7ec533676d67c9157aa552f3ab4..0b0612d771e030da739b481ea8a04e77b96da103 100644 (file)
@@ -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" } */
index d4b6fbfd52670afdf960a51c554a8b8f21da1e2c..73e80c9482b227533bb5311bf3566d365a7f40e8 100644 (file)
 - (void) method6: (id <A, A, B, B, C, C>)x;
 - (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) 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) 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) 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" } */
 
-/* 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 <A, B>)x; dg-warning "previous declaration" */
-/* - (void) methodB: (id <A>)x; dg-error "duplicate declaration" */
+- (void) methodB: (id <A, B>)x; /* { dg-message "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>)x;  dg-error "duplicate declaration"  */
+- (void) methodC: (id <A, B, C>)x; /* { dg-message "previous 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, A>)x;  dg-error "duplicate declaration"  */
+- (void) methodD: (id <A, B, C>)x;  /* { dg-message "previous 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, A> *)x;  dg-error "duplicate declaration"  */
+- (void) methodE: (MyClass <A, B, C> *)x; /* { dg-message "previous 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; /* Ok */
 
-/* - (void) methodG: (MyClass *)x;   dg-warning "previous declaration"  */
-/* - (void) methodG: (MyClass <A, B, C> *)x;  dg-error "duplicate declaration"  */
+- (void) methodG: (MyClass *)x; /* { dg-message "previous 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 *)x;  dg-error "duplicate declaration"  */
+- (void) methodH: (MyClass <A, C>*)x; /* { dg-message "previous declaration" } */
+- (void) methodH: (MyClass *)x; /* { dg-error "duplicate declaration" } */
 
 @end
index 103134116e2957e3792412d864f50fff59118767..e2aca6cc51cc3efc1d12ed751da9b80e8d447965 100644 (file)
 @end
 
 @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) 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) cMethod: (id <A, B>)x;
 - (void) dMethod: (id <A, B>)x;
 - (void) dMethod: (id <B, A>)x; /* Ok */
 
-/* FIXME: The compiler works, but the testsuite produces errors anyway.  */
-/* - (void) eMethod: (id <A>)x;   dg-error "previous declaration"  */
-/* - (void) eMethod: (id <B, C>)x;   dg-error "duplicate declaration"  */
+- (void) eMethod: (id <A>)x;    /* { dg-message "previous declaration" } */
+- (void) eMethod: (id <B, C>)x; /* { dg-error "duplicate declaration" } */
 
-/*- (void) fMethod: (id <B, C>)x;   dg-error "previous declaration"  */
-/*- (void) fMethod: (id <A>)x;   dg-error "duplicate declaration"  */
+- (void) fMethod: (id <B, C>)x;    /* { dg-message "previous declaration" } */
+- (void) fMethod: (id <A>)x;       /* { dg-error "duplicate declaration" } */
 
-/* - (void) gMethod: (id <A>)x;   dg-error "previous declaration" */
-/* - (void) gMethod: (id <A, B, C>)x;   dg-error "duplicate declaration" */
+- (void) gMethod: (id <A>)x;       /* { dg-message "previous 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>)x;   dg-error "duplicate declaration" */
+- (void) hMethod: (id <A, B, C>)x; /* { dg-message "previous declaration" } */
+- (void) hMethod: (id <A>)x;       /* { dg-error "duplicate declaration" } */
 @end
index cd423b55127c378e101bd6c5c5d7c3d4cbd16e8d..0c25aea5566d9250b88059222b6dfab43e039381 100644 (file)
@@ -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  */
     }
 
index 33744ebfa93d21b3e0f83516b98a7612e946e9ec..a9068ba89d749f071d41d5134c82a65469536ca9 100644 (file)
 
 /* 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
index 2639de9e667e57ca8831df35251b693313084de9..6a9856b902789680fca39c442611abbe19805171 100644 (file)
 {
   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
index 72abb6b76b5ecdfc0253371baf27cbd784850140..d318210986debabda500eb10567bcf598e2df5d0 100644 (file)
 @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
index 077fe6ddda2ec2db0fb44f1801864f203123fee3..85f5aecd15d06b5a9a31db2fb16fdfec320bba2b 100644 (file)
 
 @interface MyClass : MyRootClass
 { }
-@property (assign) id <MyProtocolA> 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 <MyProtocolA> 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
 
index 6106b7ee2aa6fe1305a9761802a4d9b4644f7471..d1f54b1cda8e24396157827b1b74098aff4b5848 100644 (file)
 
 /* 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" } */
-                                          /* { 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" } */
-                                               /* { 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). */
 @end
index 23b357c8505c12df483cae7c4eaa1ebc6feccdb8..de5122443c6f0507ddaa3c52ebce82c483d6c27e 100644 (file)
 {
   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 ()
index 92dd114c879251ac80f11e357fb147794b98ed3d..fc618f2bc550420fba675205f37df0fbf4683ba9 100644 (file)
@@ -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" } */
index 39ef6b2b7d7e31983d613acbf4dd31fe3205931e..49004eff4951fef9fc8e1e3fd4750969ea5d5a61 100644 (file)
@@ -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
index a298bf015721d54aa35fa7089b0b0353ab7d2827..0b30931a8813c6bfbb54120bc3648ab11269305f 100644 (file)
@@ -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
index 5d808d038f6feb7fc56147c2bc3970e2c5877ea8..25158da761a3c3ed8635d4ee229973f845fd3be0 100644 (file)
@@ -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 } */
index f6f5293e41de18005d0d6945c9493bca4002308e..2a078c9b8a8f13d856c65598bf82f7863aee2229 100644 (file)
@@ -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 } */
index 071f6f2ad2a048c8c17b10309475978f4742f424..4af3ecc742f2bfd509646ccfaed2438d67c334ae 100644 (file)
 /* 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 <MyProtocol> *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 <MyProtocol> *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;
index bcf195f9015f523f62ea5a52ad8665e8706bb8a1..7eae31d3f4db18ea98cc82c93a18d678ff034d4e 100644 (file)
 /* 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 <MyProtocol> *z;      /* { dg-warning "originally specified here" } */
-  ClassA *a;               /* { dg-warning "originally specified here" } */
+  id <MyProtocol> *z;      /* { dg-message "originally specified here" } */
+  ClassA *a;               /* { dg-message "originally specified here" } */
   ClassB *b;               
 }
 @property (assign, readonly) float v;
index a5092a11a62eac78cc2ffad700529a3d1f36eb4a..9f94754ca07a2b4d5961c13aaf99a6546465f159 100644 (file)
@@ -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];
 
index eef5bc75c62b9710494c33be6b01059f9a4e7d09..e38c0958cc343964459d51d84c1516c79ed38769 100644 (file)
@@ -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 } */
index 07ecd3f7da0eb50177a7d975775f4cf1be6797ac..413d107f24d3ab56c2598b54968e12d30e4c3873 100644 (file)
@@ -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" } */
index b46daed77fdf2e61a96d9bca53177967873e2b78..5f9b7a7f76d15b322edc4ba0633541b572361ffb 100644 (file)
@@ -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 "" } 
 }