struct Bar {}; struct Foo { Foo(int) throw(Bar); }; results in > ./cc1plus -quiet t.C t.C:4:12: warning: dynamic exception specifications are deprecated in C++11; use 'noexcept' instead [-Wdeprecated] Foo(int) throw(Bar); ^~~~~ shouldn't it suggest to omit the deprecated exception specification instead? Using 'noexcept' in this context would be clearly wrong.
noexcept(false) ?
Maybe it should suggests Foo(int) noexcept(false); but that's the same as omitting the exception specification?
(In reply to Richard Biener from comment #2) > but that's the same as omitting the exception specification? In this context, yes.
Author: jason Date: Mon Feb 20 06:05:45 2017 New Revision: 245590 URL: https://gcc.gnu.org/viewcvs?rev=245590&root=gcc&view=rev Log: PR c++/79400 - confusing suggestion of 'noexcept' * parser.c (cp_parser_exception_specification_opt): Remove suggestion for deprecated dynamic exception-specification. Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/parser.c
Fixed.