This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/3974: GCC 3.0 - ternary operator and "const char *"
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, tkarkanis at aw dot sgi dot com
- Subject: Re: c++/3974: GCC 3.0 - ternary operator and "const char *"
- From: aoliva at gcc dot gnu dot org
- Date: 10 Aug 2001 20:09:28 -0000
Synopsis: GCC 3.0 - ternary operator and "const char *"
State-Changed-From-To: open->closed
State-Changed-By: aoliva
State-Changed-When: Fri Aug 10 13:09:28 2001
State-Changed-Why:
Yep, just like mandated by the C++ Standard. String literals may be implicitly converted to type char*, but since operands 2 and 3 of the ternary operator have type const char[], they decay to const char *, and then, the result of the ternary operator cannot be converted to char*.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3974&database=gcc