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 c++/986] g++ misses warning for & on temporary



------- Comment #17 from raf2 at msux dot cjb dot net  2007-05-09 16:27 -------
> Compilers may warn about this, but they may not issue an error.
Let's see what has to say the freely available Borland C++ 5.5.1 for Windows.
Yes, it wisely stops people from compiling the attached "main.cpp":

Error E2359 main.cpp 23: Reference member 'Driver::what_drives' initialized
with a non-reference parameter in function Driver::Driver(Automobile)

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? 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=986


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