Bug 6859 - g++ 3.1 fails to diagnose an rvalue to lvalue conversion
Summary: g++ 3.1 fails to diagnose an rvalue to lvalue conversion
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-29 12:16 UTC by Martin Sebor
Modified: 2003-07-25 17:33 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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