[Bug rtl-optimization/14863] [3.4 regression] unit-at-a-time causes miscompilation
giovannibajo at libero dot it
gcc-bugzilla@gcc.gnu.org
Wed Jun 2 10:57:00 GMT 2004
------- Additional Comments From giovannibajo at libero dot it 2004-06-02 10:57 -------
Subject: Re: [3.4 regression] unit-at-a-time causes miscompilation
rguenth at tat dot physik dot uni-tuebingen dot de wrote:
> Btw. - why doesn't gcc warn about returning a reference
> to a temporary there?
It's not easy, because IntervalIterator::operator* returns a reference which is
valid for its scope. Then, reverse_iterator::operator* thinks that the
reference it gets is valid and returns it without a warning. EDG doesn't warn
as well on this testcases. I wonder if the tree gurus can find a way to detect
this and similar situations.
Giovanni Bajo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14863
More information about the Gcc-bugs
mailing list