aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-09-26 23:36:46 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-09-27 00:18:43 +0100
commit48e1b89f14f5eab9eb3f61830f608d92c4ee54b6 (patch)
tree667789c0b0fc85f8226ea86005821473eb2ede9f
parent6a4d1c374eed177eceb12a50f3b25bd20f8b347a (diff)
downloadgcc-48e1b89f14f5eab9eb3f61830f608d92c4ee54b6.zip
gcc-48e1b89f14f5eab9eb3f61830f608d92c4ee54b6.tar.gz
gcc-48e1b89f14f5eab9eb3f61830f608d92c4ee54b6.tar.bz2
libstdc++: Add missing 'inline' to always_inline function
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.
-rw-r--r--libstdc++-v3/include/bits/cow_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/cow_string.h b/libstdc++-v3/include/bits/cow_string.h
index 2298844..b78aa74 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); }