https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79400

            Bug ID: 79400
           Summary: [7 Regression] Confusing 'noexcept' suggestion on
                    throw (X)
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

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.

Reply via email to