c++/3974: GCC 3.0 - ternary operator and "const char *"

aoliva@gcc.gnu.org aoliva@gcc.gnu.org
Fri Aug 10 13:09:00 GMT 2001


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



More information about the Gcc-bugs mailing list