[Bug c++/116866] RFE: warn about suspected missing "throw" when discarding temporaries that inherit from std::exception
arthur.j.odwyer at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Mar 10 16:48:25 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116866
Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arthur.j.odwyer at gmail dot com
--- Comment #6 from Arthur O'Dwyer <arthur.j.odwyer at gmail dot com> ---
Bug #119197 is related: it asks for `std::expected` to be marked [[nodiscard]].
Microsoft STL has marked their `std::expected`; and in the same commit they
marked all their exception types as well.
That is, Microsoft has adopted the direction given in jwakely's comment #3. I
think libstdc++ should follow suit (which would also fix bug #119197).
More information about the Gcc-bugs
mailing list