[Bug c++/37854] No error when creating a variable from itself

2008-10-21 Thread manu at gcc dot gnu dot org
--- Comment #5 from manu at gcc dot gnu dot org 2008-10-21 20:58 --- Given Andrew's comments, this is not a bug. Thanks for the report nonetheless. -- manu at gcc dot gnu dot org changed: What|Removed |Added

[Bug c++/37854] No error when creating a variable from itself

2008-10-16 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2008-10-16 19:08 --- In this case since x and y are empty structs there are no real uses of them. If I change the code to: struct X {int i;}; int main() { int i = i; X x = x; X y(y); return i+x.i+y.i; } --- CUT --- And turn on o

[Bug c++/37854] No error when creating a variable from itself

2008-10-16 Thread paolo dot carlini at oracle dot com
--- Comment #3 from paolo dot carlini at oracle dot com 2008-10-16 16:22 --- In mainline (would be 4.4.0), with -Winit-self a warning is emitted for line 4 only. EDG-based compilers apparently do the same... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37854

[Bug c++/37854] No error when creating a variable from itself

2008-10-16 Thread paolo dot carlini at oracle dot com
--- Comment #2 from paolo dot carlini at oracle dot com 2008-10-16 16:18 --- Oops, sorry. -- paolo dot carlini at oracle dot com changed: What|Removed |Added

[Bug c++/37854] No error when creating a variable from itself

2008-10-16 Thread paolo dot carlini at oracle dot com
--- Comment #1 from paolo dot carlini at oracle dot com 2008-10-16 16:16 --- *** This bug has been marked as a duplicate of 34772 *** -- paolo dot carlini at oracle dot com changed: What|Removed |Added ---