This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25992] conditional expression and strings literal
- From: "anton dot kirillov at rd-software dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jan 2006 14:20:45 -0000
- Subject: [Bug c++/25992] conditional expression and strings literal
- References: <bug-25992-12082@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from anton dot kirillov at rd-software dot com 2006-01-27 14:20 -------
(In reply to comment #3)
> I have not looked into the standard yet but if GCC's warning message is correct
> this is valid but deprecated code which allows for a compiler to accept it or
> not.
>
deprecated this converiont:
void foo( char* )
{
}
int main()
{
foo( "lalala" );
}
i.e. convresion from strings literal to char*, but the result of expression (0
? "a" : "b") IS NOT STRING LITERAL!!! IT'S CONST CHAR[2]!!! ( See 5.16 )
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25992