[Bug c++/63290] New: [C++11] alias declaration with exception specification should cause compilation error

kariya_mitsuru at hotmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 18 06:49:00 GMT 2014


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

            Bug ID: 63290
           Summary: [C++11] alias declaration with exception specification
                    should cause compilation error
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kariya_mitsuru at hotmail dot com

The sample code below should cause a compilation error but it can be compiled
successfully by g++.

================================
using FP = void(*)() noexcept;
================================

cf. http://melpon.org/wandbox/permlink/mAWrk0HBXLEOxGyw


According C++11 standard [except.spec] 15.4/2, "An exception-specification
shall not appear in a typedef declaration or alias-declaration."


Note: Another sample code below causes a compilation error.

================================
typedef void(*FP)() noexcept;
================================

cf. http://melpon.org/wandbox/permlink/42ybFVNyFpAb0KN2



More information about the Gcc-bugs mailing list