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

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: r180653

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

index 6e32f5f4b8a0738b2aea7d5e74e69bc19961314c..26b98983ea1f43f79055793b479c338bc3c81fb8 100644 (file)
@@ -1,3 +1,10 @@
+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-10-18  Mikael Pettersson  <mikpe@it.uu.se>
 
        PR objc/50743
index 9690113862e6deac77f9e164ebbde0f0e4d6c4b4..4a024f419a7b2e4006e2c694a0220c168b617a3c 100644 (file)
@@ -3128,9 +3128,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