This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]