]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing 'inline' to always_inline function
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Sep 2024 22:36:46 +0000 (23:36 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 26 Sep 2024 23:18:43 +0000 (00:18 +0100)
This fixes a -Wattributes warning for the COW std::string which was
previously suppressed due to being in a system header.

libstdc++-v3/ChangeLog:

* include/bits/cow_string.h (__resize_for_overwrite): Add
inline keyword to function with always_inline attribute.

libstdc++-v3/include/bits/cow_string.h

index 2298844f38d3812a40737e8662cb8d73431794cf..b78aa74fbfafed7af07e68f10f7a56e680256b30 100644 (file)
@@ -3765,7 +3765,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   template<typename _CharT, typename _Traits, typename _Alloc>
   template<typename _Operation>
     [[__gnu__::__always_inline__]]
-    void
+    inline void
     basic_string<_CharT, _Traits, _Alloc>::
     __resize_and_overwrite(const size_type __n, _Operation __op)
     { resize_and_overwrite<_Operation&>(__n, __op); }