[Bug rtl-optimization/14863] [3.4/3.5 regression] unit-at-a-time causes miscompilation

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Thu Jun 3 01:25:00 GMT 2004


------- Additional Comments From giovannibajo at libero dot it  2004-06-03 01:25 -------
Gaby, would you mind commenting on this:
http://gcc.gnu.org/bugzilla/attachment.cgi?id=6452&action=view

I thought the code was valid because operator* returns a temporary which is 
then bound to the const reference in the return statement. EDG emits a warning 
on this though.

I found this quote in the standard: "A temporary bound to the returned value in 
a function return statement (6.6.3) persists until the function exits." which 
is cryptic to me, because the return statement does make the function exit, so 
it would make the bind totally useless.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gdr at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14863



More information about the Gcc-bugs mailing list