[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #11 from Jonathan Wakely --- (In reply to R. Diez from comment #9) > I am now curious about why GCC itself builds without RTTI. Is it really > worth disabling it? Or is it only a policy decision like "the GCC source > shall not use R

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #10 from Jonathan Wakely --- (In reply to R. Diez from comment #4) > But now I want to try -fno-rtti with my firmware. I wonder whether I should > rebuild the toolchain with -fno-rtti, as I gather that libstdc++ and maybe > other thi

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-21 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #9 from R. Diez --- Interesting. I think that vague warning in the documentation could be interpreted as "mixing is risky and/or discouraged" and should be rephrased. After all, at least some level of mixing is apparently safe. I am

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-20 Thread xry111 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment #8 fr

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-20 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #7 from R. Diez --- About using C++ exceptions without RTTI, I tried to build a toolchain for ARM (arm-none-eabi) with -fno-rtti, and I got the following compilation errors (they may be more): File eh_arm.cc: [...]/gcc-14.2.0/libst

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-20 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #6 from R. Diez --- I do not understand why you say that RTTI "names" merely need to be unique. The specification for "const char* name() const;", which I quoted in my first post, says "the returned string can be identical for sever

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 Richard Biener changed: What|Removed |Added Keywords||lto, missed-optimization --- Comment #

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-20 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #4 from R. Diez --- You are right, I'm sorry I got mixed up. Must have been memories of a distant past. I still see no reason to lose typeid and some dynamic_cast scenarios though. It's only the names of the classes that are useless

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #3 from Jonathan Wakely --- Andrew said RTTI, not exceptions. You can still use exceptions with -fno-rtti.

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-19 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 --- Comment #2 from R. Diez --- > You know most places which are size constraints ban the use of RTTI. Popular belief is often wrong. See here for details: https://github.com/rdiez/DebugDue?tab=readme-ov-file#about-c-exceptions I am actually

[Bug c++/117683] provide a way to remove all C++ class names from the binary

2024-11-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117683 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Keywords|