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: Problem with "warning: deprec ated conversion from string constant to ‘ char*’"


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.


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