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]
Other format: [Raw text]

[Bug c++/25992] conditional expression and strings literal



------- 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


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