]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
In gcc/: 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
authorNicola Pero <nicola.pero@meta-innovation.com>
Thu, 7 Oct 2010 18:37:43 +0000 (18:37 +0000)
committerNicola Pero <nicola@gcc.gnu.org>
Thu, 7 Oct 2010 18:37:43 +0000 (18:37 +0000)
In gcc/:
2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (Fast enumeration protocol): Mention that
        'unsigned int' can also be used instead of 'unsigned long' in
        countByEnumeratingWithState:objects:count:.

In gcc/objc/:
2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR objc/45925
        * objc-act.c (objc_finish_foreach_loop): Convert return value of
        countByEnumeratingWithState:objects:count: to long unsigned int.

From-SVN: r165129

gcc/ChangeLog
gcc/doc/objc.texi
gcc/objc/ChangeLog
gcc/objc/objc-act.c

index 479b616356fb5bbb48f71639b0990ed4557b1aff..17610366b287564925c2ce6f7fe6fc7417ded4ac 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       * doc/objc.texi (Fast enumeration protocol): Mention that
+       'unsigned int' can also be used instead of 'unsigned long' in
+       countByEnumeratingWithState:objects:count:.
+
 2010-10-07  Martin Jambor  <mjambor@suse.cz>
 
        * tree-sra.c (struct access): New field grp_assignment_write.
index 2bb80d15254e9778e0151a91d737476198b300e2..87c985d1e679a27f55821da4f0a47f77e3354922 100644 (file)
@@ -955,3 +955,8 @@ object is added or removed).  Or, if you are content with less strict
 mutation checks, it could point to the number of objects in your
 collection or some other value that can be checked to perform an
 approximate check that the collection has not been mutated.
+
+Finally, note how we declared the @code{len} argument and the return
+value to be of type @code{unsigned long}.  They could also be declared
+to be of type @code{unsigned int} and everything would still work.
+
index 9109229da45e655356d0d62aa7a810ddec362300..6a69bd9b3f1d38fed11a78193034124943a83eae 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-07  Nicola Pero  <nicola.pero@meta-innovation.com>
+
+       PR objc/45925
+       * objc-act.c (objc_finish_foreach_loop): Convert return value of
+       countByEnumeratingWithState:objects:count: to long unsigned int.
+
 2010-10-07  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc-act.c (build_objc_method_call): Replace calls to 
index 09fd3be0db3697ce0a2a7b0cdd2167b8f3683d56..3a135196f88c684d21d1dbbc9199e1af1e33f3cc 100644 (file)
@@ -10335,7 +10335,8 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll
                                    (NULL_TREE, build_int_cst (NULL_TREE, 16), NULL_TREE))));
   }
 #endif
-  t = build2 (MODIFY_EXPR, void_type_node, objc_foreach_batchsize_decl, t);
+  t = build2 (MODIFY_EXPR, void_type_node, objc_foreach_batchsize_decl,
+             convert (long_unsigned_type_node, t));
   SET_EXPR_LOCATION (t, location);
   append_to_statement_list (t, &BIND_EXPR_BODY (bind));
 
@@ -10508,7 +10509,8 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll
                                    (NULL_TREE, build_int_cst (NULL_TREE, 16), NULL_TREE))));
   }
 #endif
-  t = build2 (MODIFY_EXPR, void_type_node, objc_foreach_batchsize_decl, t);
+  t = build2 (MODIFY_EXPR, void_type_node, objc_foreach_batchsize_decl, 
+             convert (long_unsigned_type_node, t));
   SET_EXPR_LOCATION (t, location);
   append_to_statement_list (t, &BIND_EXPR_BODY (next_batch_bind));