]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR target/47997 (gcc on macosx: "ld: warning: -fwritable-strings not...
authorIain Sandoe <iains@gcc.gnu.org>
Sat, 12 Nov 2011 14:04:58 +0000 (14:04 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sat, 12 Nov 2011 14:04:58 +0000 (14:04 +0000)
gcc/objc:

Backport from mainline
2011-10-29  Iain Sandoe  <iains@gcc.gnu.org>

PR target/47997
* objc-act.c (objc_build_string_object): Remove redundant second
call to fix_string_type ().  Add a checking assert that we are,
indeed, passed a STRING_CST.

From-SVN: r181314

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

index 3c2516746b6a0f91b19fdc5e3c5dcab2bab4a5ad..5b6783e94b9b1ecefdcd971c96abe4e72d85d2d1 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
+
+       Backport from mainline
+       2011-10-29  Iain Sandoe  <iains@gcc.gnu.org>
+       
+       PR target/47997
+       * objc-act.c (objc_build_string_object): Remove redundant second
+       call to fix_string_type ().  Add a checking assert that we are,
+       indeed, passed a STRING_CST.
+
 2011-11-12  Iain Sandoe  <iains@gcc.gnu.org>
 
        * objc-next-runtime-abi-01.c (objc_eh_personality): Use gcc personality
index 451143531a4f64e13f72793bd007e5a80665bc34..cca60a07198da947930ce35e53cf53d8afd581bf 100644 (file)
@@ -3136,9 +3136,8 @@ objc_build_string_object (tree string)
   struct string_descriptor *desc, key;
   void **loc;
 
-  /* Prep the string argument.  */
-  string = fix_string_type (string);
-  TREE_SET_CODE (string, STRING_CST);
+  /* We should be passed a STRING_CST.  */
+  gcc_checking_assert (TREE_CODE (string) == STRING_CST);
   length = TREE_STRING_LENGTH (string) - 1;
 
   /* The target may have different ideas on how to construct an ObjC string