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

            Bug ID: 116857
           Summary: [15 Regression] libsupc++ build failure on mingw32:
                    libstdc++-v3/libsupc++/guard.cc:39:1: error:
                    declaration of 'int
                    __cxxabiv1::__cxa_guard_acquire(__guard*) noexcept'
                    has a different exception specifier
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed the build failure today on `x86_64-w64-mingw32` target as:

       > ../../../../source/libstdc++-v3/libsupc++/guard.cc:39:1: error:
declaration of 'int __cxxabiv1::__cxa_guard_acquire(__guard*) noexcept' has a
different exception specifier
       >    39 | __cxa_guard_acquire (__guard* g) _GLIBCXX_NOTHROW
       >       | ^~~~~~~~~~~~~~~~~~~
       > In file included from
../../../../source/libstdc++-v3/libsupc++/guard.cc:28:
       > /build/source/libstdc++-v3/libsupc++/cxxabi.h:120:3: note: from
previous declaration 'int __cxxabiv1::__cxa_guard_acquire(__guard*)'
       >   120 |   __cxa_guard_acquire(__guard*);
       >       |   ^~~~~~~~~~~~~~~~~~~

Looks like `__cxa_guard_acquire()` has exception mismatch:

cxxabi.h-  int
cxxabi.h:  __cxa_guard_acquire(__guard*);

guard.cc-extern "C" int
guard.cc:__cxa_guard_acquire (__guard* g) _GLIBCXX_NOTHROW

Should both have consistent _GLIBCXX_NOTHROW annotation? (or absence of both)

I'm not sure what change exposed the build failure.

Reply via email to