[Bug c++/79307] g++ misses warning for reference on temporary that invokes undefined behaviour

2017-02-01 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307 --- Comment #5 from Jonathan Wakely --- Oops, yes thank you! *** This bug has been marked as a duplicate of bug 49974 ***

[Bug c++/79307] g++ misses warning for reference on temporary that invokes undefined behaviour

2017-02-01 Thread steven.spark at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307 --- Comment #4 from Szikra --- > This is bug 44974. > > > Possible duplicate of bug #44859 or bug #51270. > > Looks more like bug 49974 to me. > > *** This bug has been marked as a duplicate of bug 44974 *** Hi you are right, my first example

[Bug c++/79307] g++ misses warning for reference on temporary that invokes undefined behaviour

2017-01-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307 --- Comment #3 from Jakub Jelinek --- Note -fsanitize=address complains about this (though ==3971==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffef8cabe50 at pc 0x004011db bp 0x7ffef8cabe10 sp 0x7ffef8cabe08 rather than use

[Bug c++/79307] g++ misses warning for reference on temporary that invokes undefined behaviour

2017-01-31 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307 --- Comment #2 from Marc Glisse --- If I remove the first one, I do get a warning x.c: In function 'int main()': x.c:5:47: warning: '' is used uninitialized in this function [-Wuninitialized] void DoSomething() {cout << "int:" << a_ <<

[Bug c++/79307] g++ misses warning for reference on temporary that invokes undefined behaviour

2017-01-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79307 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIR