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] New: condition expression and strings literal


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


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