diff mbox series

[committed] libstdc++: Add missing 'inline' to always_inline function

Message ID 20240926231924.2157216-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Add missing 'inline' to always_inline function | expand

Commit Message

Jonathan Wakely Sept. 26, 2024, 11:19 p.m. UTC
Tested x86_64-linux. Pushed to trunk.

-- >8 --

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libstdc++-v3/include/bits/cow_string.h b/libstdc++-v3/include/bits/cow_string.h
index 2298844f38d..b78aa74fbfa 100644
--- a/libstdc++-v3/include/bits/cow_string.h
+++ b/libstdc++-v3/include/bits/cow_string.h
@@ -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); }