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: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 May 2007 15:39:56 -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 #18 from bangerth at dealii dot org 2007-05-09 16:39 -------
(In reply to comment #17)
> Are comitee decisions (right or wrong) more important than consequences for
> people? So Borland protects people from undefined behaviours when they can, and
> I wonder, isn't what most people need? isn't what most people want?
You probably won't get very far by insulting people. Let it be said that the
committee's wise decision to not require an error also helps me in this
circumstance: if you go back to the example I gave in the very first comment
of this PR, then yes, using an object of type 'Y' is probably going to lead
to nothing good. On the other hand, if I never use an object of type 'Y',
then the program may look dubious, but bad nothing is going to happen.
In other words, Borland's compiler is going to prevent me from compiling
a program that is perfectly fine, is going to do everything I want, and is
going to do that reliably. Is that what you want?
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=986