http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47997
Summary: gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString" Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: anatol.pomo...@gmail.com Created attachment 23553 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23553 A repro case for "ld: warning: -fwritable-strings not compatible with literal CF/NSString" warning Hi, I am trying to implement a program that uses fsevent library on macosx. http://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/FSEvents_ProgGuide/UsingtheFSEventsFramework/UsingtheFSEventsFramework.html#//apple_ref/doc/uid/TP40005289-CH4-SW4 And I need some features (such as __thread) that is not supported neither by outdated GCC from XCode, nor by Clang. The only option is GCC from MacPorts. I installed GCC-4.6 from macports (gcc46 @4.6-20110226) and trying to compile a fsevent sample (see it in the attachement). When I try to compile it with gcc 4.6 it produces a weird warning: $ gcc-mp-4.6 -framework CoreServices ld_warn.c ld: warning: -fwritable-strings not compatible with literal CF/NSString in /var/folders/++/++27Xk++6+0++4RjPqRgNE+-0Mw/-Tmp-//cc3B1vHB.o The output binary looks OK. When I try to compile the same sources either with gcc from XCode or clang - it compiles without any warning: $ clang -framework CoreServices ld_warn.c It makes me think that this is an issue with GCC. I also googled following clang bug that looks very similar http://llvm.org/bugs/show_bug.cgi?id=8993