[Bug c++/986] g++ misses warning for & on temporary

2007-05-16 Thread raf2 at msux dot cjb dot net
--- Comment #22 from raf2 at msux dot cjb dot net 2007-05-16 08:50 --- Mmm... maybe I haven't explained correctly. If you contract someone to build stairs and later he says: "As long as you don't touch this step, everything's ok" you tell him some nasty th

[Bug c++/986] g++ misses warning for & on temporary

2007-05-14 Thread raf2 at msux dot cjb dot net
--- Comment #20 from raf2 at msux dot cjb dot net 2007-05-14 09:30 --- We have talked about the undefined behaviour of having references to objects that have been destroyed. Can someone provide a program with that undefined behaviour that could not be considered an error

[Bug c++/986] g++ misses warning for & on temporary

2007-05-09 Thread raf2 at msux dot cjb dot net
--- 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 &

[Bug c++/986] g++ misses warning for & on temporary

2007-05-08 Thread raf2 at msux dot cjb dot net
--- Comment #15 from raf2 at msux dot cjb dot net 2007-05-08 17:22 --- Created an attachment (id=13531) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13531&action=view) File with wrong code that leads to an unexpected result -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=986

[Bug c++/986] g++ misses warning for & on temporary

2007-05-08 Thread raf2 at msux dot cjb dot net
--- Comment #14 from raf2 at msux dot cjb dot net 2007-05-08 17:18 --- I first was hit by an error using MinGW... when I compiled and executed the first attached file, it wrote: John drives a: "bus" Otto drives a: "bus" Which was wrong, I report