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: c++/3974: GCC 3.0 - ternary operator and "const char *"


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


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