public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Re: deprecated conversion from string constant to 'char *'
@ 2006-07-07 21:17 Timothy C Prince
  2006-07-07 21:43 ` Ian Lance Taylor
  0 siblings, 1 reply; 14+ messages in thread
From: Timothy C Prince @ 2006-07-07 21:17 UTC (permalink / raw)
  To: gdr; +Cc: iant, gcc-help



-----Original Message-----
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: tprince@myrealbox.com
Date: 07 Jul 2006 17:52:31 +0200
Subject: Re: deprecated conversion from string constant to 'char *'

Tim Prince <timothyprince@sbcglobal.net> writes:

| Even in your example, gcc stops without making a .o file.  I did find
| that correcting __all__ the relevant prototypes to 'const char *' fixed
| my problem.  I had missed one tucked away in a long list.
| Another compiler which I use frequently, which claims a high degree of
| gcc compatibility, is unable to produce any warning.

Are you sure you're using FSF GCC?

-- Gaby


gcc built from last Saturday's post on gcc.gnu.org/pub/gcc/snapshots

I've seen remarks about that not being a reliable source for FSF gcc.  If those aren't good to use, why not offer something better?

A colleague tried the case with another colleague's build of gcc-4.2 from a few weeks ago.  His diagnostics match what I get with g++ -m32.
Tim Prince

^ permalink raw reply	[flat|nested] 14+ messages in thread
* deprecated conversion from string constant to 'char *'
@ 2006-07-07  0:13 Timothy C Prince
  2006-07-07  0:27 ` Ian Lance Taylor
  0 siblings, 1 reply; 14+ messages in thread
From: Timothy C Prince @ 2006-07-07  0:13 UTC (permalink / raw)
  To: gcc-help

g++ 4.2 rejects a quoted string constant, where the function prototype has char *.  It says warning, but the warning is fatal, even without -Werror.  -fpermissive doesn't let it pass.

info g++ lists an option -fconst-strings, but that option has been removed.

What is expected as a replacement for current source code  with 1000's of string constants, which up to now worked with char * prototype?
Tim Prince

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

end of thread, other threads:[~2007-02-06 23:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-07 21:17 Re: deprecated conversion from string constant to 'char *' Timothy C Prince
2006-07-07 21:43 ` Ian Lance Taylor
2006-07-08  1:57   ` Tim Prince
2006-07-08 15:57     ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2006-07-07  0:13 Timothy C Prince
2006-07-07  0:27 ` Ian Lance Taylor
2006-07-07  1:52   ` Tim Prince
2006-07-07 14:22     ` Gabriel Dos Reis
2006-07-07  4:18   ` Tim Prince
2006-07-07 14:23     ` Gabriel Dos Reis
2006-07-07 15:37     ` Ian Lance Taylor
2007-02-06 21:20     ` Derek Atkins
2007-02-06 22:59       ` Ian Lance Taylor
2007-02-06 23:10         ` Derek Atkins

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).