Bug ID: 87956
Summary: Gcc should emit deprecation warnings when using
throw() in C++ >= 17
Assignee: unassigned at gcc dot gnu.org
Reporter: romain.geissler at amadeus dot com
Target Milestone: ---
Today gcc always generates an error when you use a dynamic exception
specification with some exception. However I would expect we might also get a
warning with -Wdeprecated for "throw()" expressions.
With -std=gnu++17 -Wdeprecated
void f() throw(); // No deprecation warning saying you should use noexcept
void g() throw(std::exception); // Errors in C++17
I would expect a deprecation warning for f.
FYI, clang's -Wdeprecated flag finds and notifies about this.