[Bug c++/986] g++ misses warning for & on temporary
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Wed May 9 15:40:00 GMT 2007
------- 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
More information about the Gcc-bugs
mailing list