[Bug c++/25992] conditional expression and strings literal
anton dot kirillov at rd-software dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 27 14:20:00 GMT 2006
------- 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
More information about the Gcc-bugs
mailing list