[Bug c++/52967] Segmentation fault on std::vector destruction

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 13 00:15:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52967

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libstdc++                   |c++

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-04-13 00:15:05 UTC ---
I don't know if this is not undefined code.
>    v[0].a = run();

Is this:
double &a = v[0].a;
a = run();
Or:
double tmp = run();
v[0].a = tmp;

I think both are correct because of the way the C++ standard defines =.



More information about the Gcc-bugs mailing list