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

            Bug ID: 91958
           Summary: type info does not respect 'noexcept' on C++17
                    function types
           Product: gcc
           Version: 9.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alisdairm at me dot com
  Target Milestone: ---

The following program should compile and run without error when built as C++17
or later.  However, current versions of g++ will terminate throwing the
exception:

#include <typeinfo>

int main() {
    if (typeid(int()) == typeid(int() noexcept)) {
       throw "noexcept does not affect typeid";
    }
}


This program compiles and runs to completion (as expected) with Clang and Intel
icc (my EDG proxy).

Reply via email to