aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorIain Sandoe <iains@gcc.gnu.org>2011-10-29 12:59:30 +0000
committerIain Sandoe <iains@gcc.gnu.org>2011-10-29 12:59:30 +0000
commitf439d6bad9ee840bf7e63e0f7a74440679bb50e0 (patch)
treeab487a84eafeadabe8dc0e3ac445e9f030ce421d /gcc/objc
parent7a59e22a63a4bd1d90d647a461eb91f2e5ec4d7e (diff)
downloadgcc-f439d6bad9ee840bf7e63e0f7a74440679bb50e0.zip
gcc-f439d6bad9ee840bf7e63e0f7a74440679bb50e0.tar.gz
gcc-f439d6bad9ee840bf7e63e0f7a74440679bb50e0.tar.bz2
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
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog7
-rw-r--r--gcc/objc/objc-act.c5
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index 6e32f5f..26b9898 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -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
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 9690113..4a024f4 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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