This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/14863] [3.4/3.5 regression] unit-at-a-time causes miscompilation
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jun 2004 01:25:13 -0000
- Subject: [Bug rtl-optimization/14863] [3.4/3.5 regression] unit-at-a-time causes miscompilation
- References: <20040406114325.14863.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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