This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25992] New: condition 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 10:39:50 -0000
- Subject: [Bug c++/25992] New: condition expression and strings literal
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
void foo( char* );
int main()
{
foo( 0 ? "a" : "b" ); //
}
The type of expression (0 ? "a" : "b") is const char[2] but it cannot be
transformed to char*, however it works.
Why?
--
Summary: condition expression and strings literal
Product: gcc
Version: 3.4.5
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anton dot kirillov at rd-software dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25992