]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove noexcept-specifier from MCF __cxa_guard_acquire [PR116857]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Sep 2024 11:12:13 +0000 (12:12 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 26 Sep 2024 11:14:27 +0000 (12:14 +0100)
This function definition should not be marked as non-throwing, because
the declaration in <cxxabi.h> is potentially throwing.

Also fix whitespace.

libstdc++-v3/ChangeLog:

PR libstdc++/116857
* libsupc++/guard.cc (__cxa_guard_acquire): Remove
_GLIBCXX_NOTHROW to match declaration in <cxxabi.h>.

libstdc++-v3/libsupc++/guard.cc

index 364797817f722ff1e5e19261406d386be510f7c7..707083e09d069bb1a7d2db04520a73b485274cca 100644 (file)
 namespace __cxxabiv1 {
 
 extern "C" int
-__cxa_guard_acquire (__guard* g) _GLIBCXX_NOTHROW
-  {
-    return __MCF_cxa_guard_acquire(g);
-  }
+__cxa_guard_acquire (__guard* g)
+{
+  return __MCF_cxa_guard_acquire(g);
+}
 
 extern "C" void
 __cxa_guard_release (__guard* g) _GLIBCXX_NOTHROW
-  {
-    __MCF_cxa_guard_release(g);
-  }
+{
+  __MCF_cxa_guard_release(g);
+}
 
 extern "C" void
 __cxa_guard_abort (__guard* g) _GLIBCXX_NOTHROW
-  {
-    __MCF_cxa_guard_abort(g);
-  }
+{
+  __MCF_cxa_guard_abort(g);
+}
 
 }  // namespace __cxxabiv1