]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Silence -Wattributes warning in exception_ptr
authorJonathan Wakely <jwakely@redhat.com>
Wed, 18 Sep 2024 14:41:05 +0000 (15:41 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 22 Sep 2024 16:45:06 +0000 (17:45 +0100)
libstdc++-v3/ChangeLog:

* libsupc++/exception_ptr.h (__exception_ptr::_M_safe_bool_dummy):
Remove __attribute__((const)) from function returning void.

libstdc++-v3/libsupc++/exception_ptr.h

index 7c234ce0bf20083b0604a5cc32117816fe32c412..ee977a8a6eac3d1e5962e7a06024a1313cf42524 100644 (file)
@@ -151,8 +151,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
 
 #ifdef _GLIBCXX_EH_PTR_COMPAT
       // Retained for compatibility with CXXABI_1.3.
-      void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT
-       __attribute__ ((__const__));
+      void _M_safe_bool_dummy() _GLIBCXX_USE_NOEXCEPT;
       bool operator!() const _GLIBCXX_USE_NOEXCEPT
        __attribute__ ((__pure__));
       operator __safe_bool() const _GLIBCXX_USE_NOEXCEPT;