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

2022-12-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 --- Comment #8 from Jonathan Wakely --- (In reply to jo.rickert from comment #6) > Thanks, I thought the name had to be unique per translation unit. That can't possibly work. You would have to define the entire program in one translation unit,

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

2022-12-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 --- Comment #7 from Andrew Pinski --- (In reply to Eric Schmidt from comment #5) > Surely this should have been resolved as INVALID? It was marked as won't fix as I am saying we won't fix (change) the compiler to reject it (even though the

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

2022-12-11 Thread jo.rickert at protonmail dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 jo.rickert at protonmail dot ch changed: What|Removed |Added Resolution|WONTFIX |INVALID

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

2022-12-11 Thread jo.rickert at protonmail dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 --- Comment #6 from jo.rickert at protonmail dot ch --- (In reply to Andrew Pinski from comment #4) > You can read up more on the one definition rule here: > https://en.cppreference.com/w/cpp/language/definition > > It is a good summary of what

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

2022-12-11 Thread eric41293 at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 Eric Schmidt changed: What|Removed |Added CC||eric41293 at comcast dot net ---

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

2022-12-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 --- Comment #4 from Andrew Pinski --- You can read up more on the one definition rule here: https://en.cppreference.com/w/cpp/language/definition It is a good summary of what the standard says.

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

2022-12-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

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

2022-12-11 Thread jo.rickert at protonmail dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 --- Comment #2 from jo.rickert at protonmail dot ch --- The forgotten command line: g++ -o main main.cpp dummy.cpp undefined_behavior.cpp

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

2022-12-11 Thread jo.rickert at protonmail dot ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108063 jo.rickert at protonmail dot ch changed: What|Removed |Added Known to fail||11.3.1, 12.2.0, 4.8.5