This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49332] New: [C++0x] noexcept ignored on function pointer
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 21:45:41 +0000
- Subject: [Bug c++/49332] New: [C++0x] noexcept ignored on function pointer
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49332
Summary: [C++0x] noexcept ignored on function pointer
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: accepts-invalid, rejects-valid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jason@gcc.gnu.org
CC: jason@gcc.gnu.org
Depends on: 12255
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.