From mboxrd@z Thu Jan 1 00:00:00 1970 From: aoliva@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, tkarkanis@aw.sgi.com Subject: Re: c++/3974: GCC 3.0 - ternary operator and "const char *" Date: Fri, 10 Aug 2001 13:09:00 -0000 Message-id: <20010810200928.28116.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00180.html List-Id: 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