[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2024-01-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #16 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:9f3eb93e72703f6ea30aa27d0b6fc6db62cb4a04 commit r14-6942-g9f3eb93e72703f6ea30aa27d0b6fc6db62cb4a04 Author: Jonathan Wakely

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2024-01-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #15 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > (In reply to Peter Dimov from comment #7) > > You don't necessarily need dynamic_cast because facets are always installed > > and obtained by their exact

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2024-01-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-26 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #13 from andysem at mail dot ru --- (In reply to Jonathan Wakely from comment #12) > (In reply to andysem from comment #11) > > > I'm not sure what you mean by "the compiler is free to generate code that > > > takes it into

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #12 from Jonathan Wakely --- (In reply to andysem from comment #11) > > I'm not sure what you mean by "the compiler is free to generate code that > > takes it into account." Takes what into account? What problem does that > >

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #11 from andysem at mail dot ru --- > I'm not sure what you mean by "the compiler is free to generate code that > takes it into account." Takes what into account? What problem does that > freedom cause? I mean the compiler could

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread pdimov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #10 from Peter Dimov --- Maybe the right thing to do is to use dynamic_cast only for virtual inheritance (either have a trait or check whether static_cast isn't a valid expression), otherwise static_cast, in both cases (standard and

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #9 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > (In reply to Peter Dimov from comment #7) > > You don't necessarily need dynamic_cast because facets are always installed > > and obtained by their exact

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #8 from Jonathan Wakely --- (In reply to Peter Dimov from comment #7) > You don't necessarily need dynamic_cast because facets are always installed > and obtained by their exact type, not via a reference to base. Is that true?

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread pdimov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #7 from Peter Dimov --- You don't necessarily need dynamic_cast because facets are always installed and obtained by their exact type, not via a reference to base. You can store the Facet* as given (like shared_ptr does), and return

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #6 from Jonathan Wakely --- (In reply to andysem from comment #3) > I think, a failing dynamic_cast would not be useful as this would make > std::use_facet unusable with -fno-rtti. I don't see a problem with that. If you want to

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-24 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #5 from Jonathan Wakely --- I'm not sure what you mean by "the compiler is free to generate code that takes it into account." Takes what into account? What problem does that freedom cause? The locale facet instantiations are

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-23 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #4 from andysem at mail dot ru --- > It's mostly OK to mix code with -frtti and -fno-rtti, but sometimes it bites > you. Note that in this case, it is the standard library that is built with -frtti and the rest of the code is built

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-23 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #3 from andysem at mail dot ru --- I think, a failing dynamic_cast would not be useful as this would make std::use_facet unusable with -fno-rtti. Re. ODR violation in the latest code, while it is true that the dynamic/static_cast is

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 --- Comment #2 from Jonathan Wakely --- It's mostly OK to mix code with -frtti and -fno-rtti, but sometimes it bites you. The crash with older releases seems like __dynamic_cast should gracefully handle missing RTTI and just fail, not

[Bug libstdc++/113099] locale without RTTI uses dynamic_cast before gcc 13.2 or has ODR violation since gcc 13.2

2023-12-21 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113099 Richard Biener changed: What|Removed |Added Keywords||ABI, documentation --- Comment #1