[Bug c++/55526] [C++11] Irrelevant error message for function parameter wrongly used in noexcept specifier
jason at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 13 19:06:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55526
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Severity|minor |enhancement
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-13 19:05:43 UTC ---
It's not irrelevant; a function parameter only has a value within the function
body, and the noexcept-specifier is not part of the body, so any use of the
parameter in a potentially-evaluated context is ill-formed. If the testcase
said noexcept(noexcept(i)) the use would be in unevaluated context, and
therefore OK.
The error message you mention might be clearer, but the one G++ is currently
giving is correct.
More information about the Gcc-bugs
mailing list