Re: Problem with "warning: deprecated conversion from string constant to ‘char*’"

Cedric Roux cedric.roux@acri-st.fr
Tue Oct 12 15:47:00 GMT 2010


Jens Rehsack wrote:
> Correct. And if the strings are not modifiable? (I thought I provided an
> example which shows, that they neither are assumed being modifiable
> nor being modified).

no warning:
const char *x = "abc";

warning:
char *x = "abc";

maybe that's what you're after?
You can use const in your structs as well.

HTH
Cedric.



More information about the Gcc-help mailing list