This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/49332] New: [C++0x] noexcept ignored on function pointer


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]