This is the mail archive of the gcc-help@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]

Re: deprecated conversion from string constant to 'char *'


Tim Prince <timothyprince@sbcglobal.net> writes:

> >> cat foo.cc
> > extern void foo(char*);
> > void bar() { foo("Hello"); }
> >> g++ -c foo.cc
> > foo.cc: In function Âvoid bar()Â:
> > foo.cc:2: warning: deprecated conversion from string constant to Âchar*Â'
> >> echo $?
> > 0
> > Looks like a warning to me, not an error.  Please give a small source
> > code example and the command line you are using.
> > Ian
> >
> Ian,
> Even in your example, gcc stops without making a .o file.

No, it doesn't.  It creates a .o files as expected.

There is nothing we can do if you can not give us a test case and a
command line.  We believe that everything works fine: g++ issues a
warning and carries on.  I'm willing to believe that something else
happens for you, but without a clear test case we can not help you.

Also, which version of gcc are you using?  I'm testing current
mainline--i.e., not any released version.

Also, by the way, g++ does not does not change behaviour when it emits
more than some number of warnings.

Ian


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