]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
In gcc/objc/:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2010 23:20:21 +0000 (23:20 +0000)
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Dec 2010 23:20:21 +0000 (23:20 +0000)
2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>

* objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
error() when printing an error about the iterating variable or
collection not being an object.

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

* objc.dg/foreach-6.m: Updated location of error messages.
* objc.dg/foreach-7.m: Same change.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167610 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/objc/ChangeLog
gcc/objc/objc-act.c
gcc/testsuite/ChangeLog
gcc/testsuite/objc.dg/foreach-6.m
gcc/testsuite/objc.dg/foreach-7.m

index f3001e581fbdab9516b1bd071681f13f454b516d..09977270e2fbc72b9788644a09899d3b11fc4ab3 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * objc-act.c (objc_finish_foreach_loop): Use error_at() instead of
+       error() when printing an error about the iterating variable or
+       collection not being an object.
+
 2010-12-06  Nicola Pero  <nicola.pero@meta-innovation.com>
 
        * objc-act.c (objc_finish_foreach_loop): Mark the
index f53055652eabb9dc00435e45aad48a4fde852905..f760aad700a9d49e9b190d5502e94a2087487557 100644 (file)
@@ -13246,13 +13246,13 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll
 
   if (!objc_type_valid_for_messaging (TREE_TYPE (object_expression), true))
     {
-      error ("iterating variable in fast enumeration is not an object");
+      error_at (location, "iterating variable in fast enumeration is not an object");
       return;
     }
 
   if (!objc_type_valid_for_messaging (TREE_TYPE (collection_expression), true))
     {
-      error ("collection in fast enumeration is not an object");
+      error_at (location, "collection in fast enumeration is not an object");
       return;
     }
 
index c0af4e337db3239da08c391a0e779f83c0e24699..c7e0e21769e464dbdbebbbf008d36086a371be50 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-08  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * objc.dg/foreach-6.m: Updated location of error messages.
+       * objc.dg/foreach-7.m: Same change.
+       
 2010-12-08  Richard Guenther  <rguenther@suse.de>
            Sebastian Pop  <sebastian.pop@amd.com>
 
index 3578b77aa62af90fbe9208e89eea5042e41aae15..96b145365c1efb3269f110fa3cb3205aa576c5a6 100644 (file)
@@ -46,16 +46,16 @@ int main (void)
     ;
 
   for (12 in array) /* { dg-error "invalid iterating variable in fast enumeration" } */
-    ; /* { dg-error "iterating variable in fast enumeration is not an object" } */
+    ;               /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 48 } */
 
-  for (object in 12)
-    ; /* { dg-error "collection in fast enumeration is not an object" } */
+  for (object in 12) /* { dg-error "collection in fast enumeration is not an object" } */
+    ;
 
-  for (object in invalid)
-    ; /* { dg-error "collection in fast enumeration is not an object" } */
+  for (object in invalid) /* { dg-error "collection in fast enumeration is not an object" } */
+    ;
 
-  for (invalid in [object enumerator])
-    ; /* { dg-error "iterating variable in fast enumeration is not an object" } */
+  for (invalid in [object enumerator]) /* { dg-error "iterating variable in fast enumeration is not an object" } */
+    ;
 
   return 0;
 }
index 5da940f620ee7ef84aef16ca47880f526d5a0143..4629d61e1c18ce1ecdd15caed14cd801f2cd9e73 100644 (file)
@@ -36,10 +36,10 @@ int main (void)
   id object = nil;
 
   for (typedef int my_typedef in array) /* { dg-error "declaration of non-variable" } */
-    ; /* { dg-error "iterating variable in fast enumeration is not an object" } */
+    ;                                   /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 38 } */
 
   for (function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
-    ; /* { dg-error "iterating variable in fast enumeration is not an object" } */
+    ;                      /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 41 } */
 
   for (object_function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
     ;