c++/2350: No warning for referencing a temporary
rth@gcc.gnu.org
rth@gcc.gnu.org
Mon Apr 1 23:58:00 GMT 2002
Old Synopsis: constant propagation problem accross function call
New Synopsis: No warning for referencing a temporary
State-Changed-From-To: open->analyzed
State-Changed-By: rth
State-Changed-When: Mon Apr 1 23:58:06 2002
State-Changed-Why:
Not a bug. The cast converts your lvalue to an rvalue, which
leads you referencing a temporary rather than the variable
that you intended.
It would be Really Nice if -Wall would diagnose this, so I'm
leaving the PR open, and re-categorizing it.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2350
More information about the Gcc-bugs
mailing list