[Bug c++/108063] push_back on std::vector allocates wrong amount of memory

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 11 17:10:44 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is called a violation of the one definition rule. In c++ classes even have
linkage.

No diagnostic is required as it is undefined behavior ar runtime.

Note using  -flto and you would catch these.


More information about the Gcc-bugs mailing list