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++/83534] New: C++17: typeinfo for noexcept function lacks noexcept information


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

            Bug ID: 83534
           Summary: C++17: typeinfo for noexcept function lacks noexcept
                    information
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sbergman at redhat dot com
  Target Milestone: ---

At least with current trunk towards GCC 8.0, but also with GCC 7.2.1:

> ~ cat test.cc
> #include <iostream>
> #include <typeinfo>
> void f1();
> void f2() noexcept;
> int main() { std::cout << (typeid(f1) == typeid(f2)) << '\n'; }
> 
> ~ g++ -std=c++17 test.cc
> ~ ./a.out
> 1

should print "0" instead, as those are different types since C++17 (and using

  typeid(&f1) == tpyeid(&f2)

instead correctly prints "0").

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