This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/47997] gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString"


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47997

--- Comment #18 from mrs at gcc dot gnu.org <mrs at gcc dot gnu.org> 2011-07-20 21:25:37 UTC ---
Iain, I'm thinking we should do your code unconditionally for darwin10 and
later.  In darwin10.h, we put:

#define LINKER_PEDANTICALLY_WANTS_CSTRING 1

and then in the code:

   if ((LINKER_PEDANTICALLY_WANTS_CSTRING
       || darwin_constant_cfstrings || flag_merge_constants)
       && TREE_CODE (exp) == STRING_CST
       && TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
       && align <= 256

Another possibility, is to just _always_ do this:

   if (TREE_CODE (exp) == STRING_CST
       && TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
       && align <= 256

thoughts?  Jack, if you do the testsuite run, I'll check it in if it works. 
I'm a little nervous about the release branch...  :-(  Linker, shut up, would
have been my preference, but, I don't know if we have that option.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]