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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim Prince <timothyprince@xxxxxxxxxxxxx> 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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux