[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-13 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 Manuel López-Ibáñez changed: What|Removed |Added Depends on||19808 CC|

[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-08 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 --- Comment #5 from Marc Glisse --- Yes, then we are back to the fact that it works for A=int but not for A a class containing an int.

[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-08 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 --- Comment #4 from Antony Polukhin --- Adding members and usage does not make a difference https://godbolt.org/z/VommHu struct A { A(); int i; }; struct B { B(A); int i; }; struct composed2 { B b_; A a_; composed2() : b_(a_) {} }

[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-08 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 --- Comment #3 from Marc Glisse --- And this translation unit doesn't actually generate any code at all, so the way the warning is currently implemented has no chance of even looking at it.

[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-08 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 --- Comment #2 from Marc Glisse --- gcc warns for this at the level of actual instructions, not user code. Since A is empty, nothing uninitialized is getting copied.

[Bug c++/96121] Uninitialized variable copying not diagnosed

2020-07-08 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96121 Jonathan Wakely changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED