public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anatol.pomozov at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/47997] New: gcc on macosx: "ld: warning: -fwritable-strings not compatible with literal CF/NSString"
Date: Sat, 05 Mar 2011 01:06:00 -0000	[thread overview]
Message-ID: <bug-47997-4@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2011-03-05  1:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05  1:06 anatol.pomozov at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47997-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).