Commit f439d6ba by Iain Sandoe

re PR target/47997 (gcc on macosx: "ld: warning: -fwritable-strings not…

re PR target/47997 (gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString")


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
parent 7a59e22a
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> 2011-10-18 Mikael Pettersson <mikpe@it.uu.se>
PR objc/50743 PR objc/50743
......
...@@ -3128,9 +3128,8 @@ objc_build_string_object (tree string) ...@@ -3128,9 +3128,8 @@ objc_build_string_object (tree string)
struct string_descriptor *desc, key; struct string_descriptor *desc, key;
void **loc; void **loc;
/* Prep the string argument. */ /* We should be passed a STRING_CST. */
string = fix_string_type (string); gcc_checking_assert (TREE_CODE (string) == STRING_CST);
TREE_SET_CODE (string, STRING_CST);
length = TREE_STRING_LENGTH (string) - 1; length = TREE_STRING_LENGTH (string) - 1;
/* The target may have different ideas on how to construct an ObjC string /* The target may have different ideas on how to construct an ObjC string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment