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

Re: Need an opinion from C++ folks


Christian, the behavior you are seeing is what the standard specifies.
String literals are now of type 'const char[n]', but there is a deprecated
conversion from string literal to 'char *', which is why it works without
the ?: expression.

You can restore the old semantics with -fno-const-strings.

Jason


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