[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-04 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #24 from R. Diez --- In case somebody else wants to patch their GCC 12.2, here is the slightly-modified patch for convenience: https://github.com/rdiez/DebugDue/blob/master/Toolchain/Patches/Gcc12EhGlobalsAtexit.patch

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-04 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #23 from R. Diez --- Many thanks for the fix. If you backport it to GCC 12.x, I won't be able to complain so much. ;-)

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-04 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #20 from R. Diez --- I had to modify the patch slightly. I guess that union member "unsigned char unused;" was removed after GCC 12.2 was released. But otherwise, the patch does work, at least in my bare-metal scenario. The atexit e

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-03 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #16 from R. Diez --- I am slowly arriving at a different conclusion. "struct __cxa_eh_globals" has neither a constructor nor a destructor. Its members are pointers or integers, so GCC will not have automatically generated any constr

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 R. Diez changed: What|Removed |Added Resolution|DUPLICATE |FIXED --- Comment #13 from R. Diez --- >From

[Bug libstdc++/105880] eh_globals_init destructor not setting _M_init to false

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105880 R. Diez changed: What|Removed |Added CC||rdiezmail-gcc at yahoo dot de --- Comment #17

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #9 from R. Diez --- > [...] > not just "turn on -Os and all the code gets removed". I am sure that the solution is not as trivial as "turn on -Os". But, as an outsider, it is hard to believe that it "takes non-trivial analysis of th

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #8 from R. Diez --- Why does this 'eh_globals' object have to use a constexpr constructor? How does the current code avoid the "static initialization order fiasco"? If the user defines his/her own static C++ objects, how is it guara

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #5 from R. Diez --- I know very little about GCC, but it is a very smart compiler, so I am having a hard time understanding how GCC could miss so many optimisations. After all, even when compiling with little optimisation, GCC seems

[Bug c++/107500] Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-02 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 --- Comment #4 from R. Diez --- The 'constant_init' wrapper with the 'union' inside is a contrived hack, isn't it? We may as well use a different hack then. How about a combination of '__attribute__ constructor' and 'placement new' like this?

[Bug c++/107500] New: Useless atexit entry for ~constant_init in eh_globals.cc

2022-11-01 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500 Bug ID: 107500 Summary: Useless atexit entry for ~constant_init in eh_globals.cc Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Pr

[Bug libstdc++/68606] Reduce or disable the static emergency pool for C++ exceptions

2022-09-28 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68606 --- Comment #13 from R. Diez --- It is hard to automatically tell whether nobody else is using such a statically-allocated emergency buffer. In my case, I am using C++ exceptions, so the linker will probably always include the buffer. My patch m

[Bug libstdc++/68606] Reduce or disable the static emergency pool for C++ exceptions

2022-09-28 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68606 --- Comment #11 from R. Diez --- > Has a solution been found for embedded systems with very limited resources? > In this case for example, C++ exceptions can be disabled and this > emergency pool not needed. Contrary to popular belief, C++ exce

[Bug c++/98992] attribute malloc error associating a member deallocator with an allocator

2022-06-24 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98992 R. Diez changed: What|Removed |Added CC||rdiezmail-gcc at yahoo dot de --- Comment #1 f

[Bug target/68605] Add -mno-crt0 to disable automatic crt0 injection

2022-04-08 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68605 --- Comment #4 from R. Diez --- That is certainly a way to fix the crt0 nuisance. But it requires some specs file black magic, so yet another thing to learn. And then you have to keep up with GCC in case something changes around the specs files.

[Bug bootstrap/60160] Building with -flto in CFLAGS_FOR_TARGET / CXXFLAGS_FOR_TARGET

2022-04-08 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60160 R. Diez changed: What|Removed |Added CC||rdiezmail-gcc at yahoo dot de --- Comment #6 f

[Bug bootstrap/104301] New: --enable-cstdio=stdio_pure not passed down to libstdc++-v3

2022-01-31 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104301 Bug ID: 104301 Summary: --enable-cstdio=stdio_pure not passed down to libstdc++-v3 Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/104299] New: Doc: stdio is not the only option in --enable-cstdio=XXX

2022-01-31 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104299 Bug ID: 104299 Summary: Doc: stdio is not the only option in --enable-cstdio=XXX Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Pr

[Bug bootstrap/98324] [11 Regression] bootstrap broken with a LTO build configured with --enable-default-pie

2021-12-15 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98324 R. Diez changed: What|Removed |Added CC||rdiezmail-gcc at yahoo dot de --- Comment #7 f

[Bug c/42579] [PATCH] support for obtaining file basename

2021-05-31 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42579 --- Comment #12 from R. Diez --- *** Bug 77488 has been marked as a duplicate of this bug. ***

[Bug preprocessor/77488] Proposal for __FILENAME_ONLY__

2021-05-31 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77488 R. Diez changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRMED

[Bug c/42579] [PATCH] support for obtaining file basename

2021-05-31 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42579 R. Diez changed: What|Removed |Added CC||rdiezmail-gcc at yahoo dot de --- Comment #11

[Bug debug/100446] GDB has problems reading GCC's debugging info level -g3

2021-05-06 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100446 --- Comment #5 from R. Diez --- In a nutshell: "objdump --syms" does not show that symbol, probably because the routine was inlined, but "readelf --debug-dump" does show it. Thanks for your help.

[Bug debug/100446] GDB has problems reading GCC's debugging info level -g3

2021-05-06 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100446 --- Comment #3 from R. Diez --- Regarding "shifting the blame", no worries, I am grateful for any help. I suspect that there is more than 1 issue here. Could you take a look at the following aspect mentioned in the GDB bug? 8<8< I

[Bug other/100446] New: GDB has problems reading GCC's debugging info level -g3

2021-05-06 Thread rdiezmail-gcc at yahoo dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100446 Bug ID: 100446 Summary: GDB has problems reading GCC's debugging info level -g3 Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Pri