[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 sandra at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from sandra at gcc dot gnu.org --- Fixed on trunk.
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 --- Comment #6 from sandra at gcc dot gnu.org --- Author: sandra Date: Sun Nov 11 22:46:00 2018 New Revision: 266020 URL: https://gcc.gnu.org/viewcvs?rev=266020=gcc=rev Log: 2018-11-11 Sandra Loosemore PR c++/43105 gcc/ * doc/invoke.texi (C++ Dialect Options): Add warning about mixing -frtti and -fno-rtti code. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/invoke.texi
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 --- Comment #5 from Jonathan Wakely --- Works for me.
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 sandra at gcc dot gnu.org changed: What|Removed |Added CC||sandra at gcc dot gnu.org --- Comment #4 from sandra at gcc dot gnu.org --- It sounds to me like the right solution here is just to add a vague warning that mixing -frtti and -fno-rtti code may not always work, citing the base class example in the issue problem statement. WDYT?
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 --- Comment #3 from Jonathan Wakely --- (In reply to Jeffrey Yasskin from comment #0) > programs don't link when a -frtti class is derived from a -fno-rtti base > class. It's more complicated than that. The ABI defines when RTTI is emitted: https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-rtti There's only a problem when compiling a key function with -fno-rtti, and other translation units compiled with -frtti have no way to know how the key function was compiled. For example, given: struct A { A(); ~A(); }; struct B { B(); virtual ~B() { } }; struct C { C(); virtual ~C(); }; A and B can always be derived from unconditionally. If C::~C() is compiled with -fno-rtti then classes that derive from C must also use -fno-rtti to compile their key function (and if they don't have a key function, then all uses of C that need a definition must be compiled with -fno-rtti). I don't think this can be fixed. Documenting it is non-trivial. I went to see what Clang does, and I can't even find -frtti / -fno-rtti in the manual, so we're doing better than that!
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 Eric Gallager changed: What|Removed |Added CC||gerald at pfeifer dot com, ||joseph at codesourcery dot com, ||sandra at codesourcery dot com --- Comment #2 from Eric Gallager --- cc-ing docs co-maintainers
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-08-17 CC||egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Gallager --- Redoing https://gcc.gnu.org/ml/gcc-bugs/2017-08/msg01628.html Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-08-14 CC||egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Gallager --- Confirmed, text in the current docs is still pretty much the same as it was in 4.4.3.
[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-08-14 CC||egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Gallager --- Confirmed, text in the current docs is still pretty much the same as it was in 4.4.3.