Bug 6859

Summary: g++ 3.1 fails to diagnose an rvalue to lvalue conversion
Product: gcc Reporter: Martin Sebor <msebor>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, nathan
Priority: P3    
Version: 3.1   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Martin Sebor 2002-05-29 12:16:02 UTC
The program below is ill-formed and should be diagnosed.

Release:
gcc 3.1

How-To-Repeat:
$ cat t.cpp ; g++ --version ; g++ -c -pedantic t.cpp
void foo (char*&);

int main ()
{
    signed char *s;
    foo (reinterpret_cast<char*>(s));
}

g++ (GCC) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 1 Nathan Sidwell 2002-09-14 15:20:19 UTC
State-Changed-From-To: open->closed
State-Changed-Why: fixed in cvs