You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.7 KiB
39 lines
1.7 KiB
11 months ago
|
commit 03af8492bee6243a9d10e78fea1a3e423bd5f9cd
|
||
|
Author: Jonathan Wakely <jwakely@redhat.com>
|
||
|
Date: Fri May 27 12:43:18 2022 +0100
|
||
|
|
||
|
libstdc++: Mark non-exported function always_inline [PR105671]
|
||
|
|
||
|
This new function was added for gcc 11.1 but is not exported from the
|
||
|
shared library. Depending on inlining decisions, its callers might get
|
||
|
inlined but an external definition be needed for this function. That
|
||
|
then fails to link.
|
||
|
|
||
|
Since we can't add the export to the gcc-11 release branch now, mark it
|
||
|
always_inline. We can consider exporting it for gcc-13 if/when we bump
|
||
|
the shared library version (and maybe also for gcc-12 which is currently
|
||
|
at the same version as trunk). For now, the attribute will solve the
|
||
|
problem on all affected branches. The function is small enough that
|
||
|
force-inlining it shouldn't cause problems.
|
||
|
|
||
|
libstdc++-v3/ChangeLog:
|
||
|
|
||
|
PR libstdc++/105671
|
||
|
* include/std/sstream (basic_stringbuf::_M_high_mark): Add
|
||
|
always_inline attribute.
|
||
|
|
||
|
(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021)
|
||
|
|
||
|
diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream
|
||
|
index f21664100ab..56555ecd98a 100644
|
||
|
--- a/libstdc++-v3/include/std/sstream
|
||
|
+++ b/libstdc++-v3/include/std/sstream
|
||
|
@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
|
||
|
// This might not be the same character as _M_string.end() because
|
||
|
// basic_stringbuf::overflow might have written to unused capacity
|
||
|
// in _M_string without updating its length.
|
||
|
+ __attribute__((__always_inline__))
|
||
|
char_type*
|
||
|
_M_high_mark() const _GLIBCXX_NOEXCEPT
|
||
|
{
|