public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47997] New: gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString"
@ 2011-03-05  1:06 anatol.pomozov at gmail dot com
  2011-03-05  2:26 ` [Bug c/47997] " howarth at nitro dot med.uc.edu
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: anatol.pomozov at gmail dot com @ 2011-03-05  1:06 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: anatol.pomozov@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


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2011-11-12 14:07 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05  1:06 [Bug c/47997] New: gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString" anatol.pomozov at gmail dot com
2011-03-05  2:26 ` [Bug c/47997] " howarth at nitro dot med.uc.edu
2011-03-05  9:08 ` iains at gcc dot gnu.org
2011-03-05 10:18 ` [Bug target/47997] " iains at gcc dot gnu.org
2011-03-07 15:38 ` howarth at nitro dot med.uc.edu
2011-03-07 17:45 ` mrs at gcc dot gnu.org
2011-03-07 17:47 ` howarth at nitro dot med.uc.edu
2011-03-07 18:16 ` mikestump at comcast dot net
2011-03-12  4:50 ` anatol.pomozov at gmail dot com
2011-03-12 10:09 ` iains at gcc dot gnu.org
2011-03-12 13:45 ` iains at gcc dot gnu.org
2011-03-12 16:24 ` mikestump at comcast dot net
2011-06-26 16:26 ` iains at gcc dot gnu.org
2011-06-28  9:17 ` iains at gcc dot gnu.org
2011-06-28  9:18 ` iains at gcc dot gnu.org
2011-07-20 20:52 ` tobias.netzel at googlemail dot com
2011-07-20 20:54 ` tobias.netzel at googlemail dot com
2011-07-20 21:16 ` mrs at gcc dot gnu.org
2011-07-20 21:26 ` mrs at gcc dot gnu.org
2011-07-20 21:54 ` tobias.netzel at googlemail dot com
2011-07-21  7:55 ` iains at gcc dot gnu.org
2011-07-21  9:06 ` iains at gcc dot gnu.org
2011-07-21 10:36 ` iains at gcc dot gnu.org
2011-07-21 14:53 ` iains at gcc dot gnu.org
2011-08-31 19:03 ` mrs at gcc dot gnu.org
2011-09-08 16:30 ` tobias.netzel at googlemail dot com
2011-10-29 13:00 ` iains at gcc dot gnu.org
2011-10-29 13:04 ` iains at gcc dot gnu.org
2011-11-12 14:13 ` iains at gcc dot gnu.org
2011-11-12 14:14 ` iains at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).