This testcase should give an error on the initialization and no error on the static_assert. // { dg-options -std=c++0x } void f(); void (*p)() noexcept = f; // { dg-error "" } #define SA(X) static_assert((X),#X) SA(noexcept(p())); The underlying issue is PR 12255, but while this behavior was not observable in C++98, it is observable in C++0x.
Or rather in C++98 it was observable through diagnostics, but couldn't change the behavior of a well-defined program.
This still compiles without errors in C++11, but in C++17: 49332.C:4:24: error: invalid conversion from ‘void (*)()’ to ‘void (*)() noexcept’ [-fpermissive] 4 | void (*p)() noexcept = f; // { dg-error "" } | ^ | | | void (*)()
*** Bug 103092 has been marked as a duplicate of this bug. ***