[Bug c++/37911] Operator= called on a non constructed object.

2008-12-23 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2008-12-24 05:53 --- el = toto ? el = parse() : parse2(); IIRC you are using el before it was initialized which is undefined behavior at runtime so closing as invalid. We cannot error out but could warn about it but it is hard sometim

[Bug c++/37911] Operator= called on a non constructed object.

2008-10-24 Thread wonsjb at gmail dot com
--- Comment #2 from wonsjb at gmail dot com 2008-10-24 17:58 --- I am not sure what should be the right behavior here. Maybe a compile error. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37911

[Bug c++/37911] Operator= called on a non constructed object.

2008-10-24 Thread cfairles at gcc dot gnu dot org
--- Comment #1 from cfairles at gcc dot gnu dot org 2008-10-24 16:06 --- I haven't double checked the standard but this looks like undefined behavior. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37911