This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/986] g++ misses warning for & on temporary
- From: "chris at bubblescope dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2007 16:05:06 -0000
- Subject: [Bug c++/986] g++ misses warning for & on temporary
- References: <bug-986-184@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #19 from chris at bubblescope dot net 2007-05-09 17:05 -------
while I agree we shouldn't produce an error here, personally I'm highly
unconvinced by your argument. If I had some code which if called would always
lead to undefined behaviour, but never called it, I would still want to be
told. By the same argument, why bother type-checking functions if we can prove
they are never called?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=986