This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Need an opinion from C++ folks
- To: gafton at redhat dot com
- Subject: Re: Need an opinion from C++ folks
- From: Jason Merrill <jason at cygnus dot com>
- Date: 28 Oct 1998 18:51:33 -0800
- Cc: law at cygnus dot com, egcs-bugs at cygnus dot com
- References: <26307.909613289.cygnus.egcs.bugs@hurl.cygnus.com>
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