public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] libstdc++: define and undefine always_inline macro wherever used
@ 2023-11-15 5:54 Alexandre Oliva
0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2023-11-15 5:54 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:a50a7f74ca532267c1c34f6fe8ae3611a595b38f
commit a50a7f74ca532267c1c34f6fe8ae3611a595b38f
Author: Alexandre Oliva <oliva@gnu.org>
Date: Wed Nov 15 02:43:59 2023 -0300
libstdc++: define and undefine always_inline macro wherever used
Diff:
---
libstdc++-v3/include/bits/atomic_base.h | 10 ++++++----
libstdc++-v3/include/bits/atomic_futex.h | 2 ++
libstdc++-v3/include/bits/char_traits.h | 8 +++++---
libstdc++-v3/include/bits/semaphore_base.h | 7 +++++++
libstdc++-v3/include/bits/stl_bvector.h | 10 ++++++----
libstdc++-v3/include/std/barrier | 8 ++++++++
libstdc++-v3/include/std/latch | 7 +++++++
7 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h
index 974872ad7a6..5562365c74c 100644
--- a/libstdc++-v3/include/bits/atomic_base.h
+++ b/libstdc++-v3/include/bits/atomic_base.h
@@ -42,14 +42,14 @@
#include <bits/atomic_wait.h>
#endif
-#ifndef _GLIBCXX_ALWAYS_INLINE
-#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
-#endif
-
#define __glibcxx_want_atomic_value_initialization
#define __glibcxx_want_atomic_flag_test
#include <bits/version.h>
+#ifndef _GLIBCXX_ALWAYS_INLINE
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -2067,4 +2067,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif
diff --git a/libstdc++-v3/include/bits/atomic_futex.h b/libstdc++-v3/include/bits/atomic_futex.h
index 6b37ce5ed12..0f370fa82de 100644
--- a/libstdc++-v3/include/bits/atomic_futex.h
+++ b/libstdc++-v3/include/bits/atomic_futex.h
@@ -357,4 +357,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif
diff --git a/libstdc++-v3/include/bits/char_traits.h b/libstdc++-v3/include/bits/char_traits.h
index e9b4e84af99..e56818b254b 100644
--- a/libstdc++-v3/include/bits/char_traits.h
+++ b/libstdc++-v3/include/bits/char_traits.h
@@ -57,13 +57,13 @@
# include <bits/stl_construct.h>
#endif
+#define __glibcxx_want_constexpr_char_traits
+#include <bits/version.h>
+
#ifndef _GLIBCXX_ALWAYS_INLINE
# define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
#endif
-#define __glibcxx_want_constexpr_char_traits
-#include <bits/version.h>
-
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1027,4 +1027,6 @@ _GLIBCXX_END_NAMESPACE_VERSION
#endif // C++11
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif // _CHAR_TRAITS_H
diff --git a/libstdc++-v3/include/bits/semaphore_base.h b/libstdc++-v3/include/bits/semaphore_base.h
index 2b3c196040b..06a45f6876a 100644
--- a/libstdc++-v3/include/bits/semaphore_base.h
+++ b/libstdc++-v3/include/bits/semaphore_base.h
@@ -45,6 +45,10 @@
# include <semaphore.h> // sem_t, sem_init, sem_wait, sem_post etc.
#endif
+#ifndef _GLIBCXX_ALWAYS_INLINE
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -274,4 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif // _GLIBCXX_SEMAPHORE_BASE_H
diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h
index 64f04c1f4f5..c1aa3396414 100644
--- a/libstdc++-v3/include/bits/stl_bvector.h
+++ b/libstdc++-v3/include/bits/stl_bvector.h
@@ -56,15 +56,15 @@
#ifndef _STL_BVECTOR_H
#define _STL_BVECTOR_H 1
-#ifndef _GLIBCXX_ALWAYS_INLINE
-#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
-#endif
-
#if __cplusplus >= 201103L
#include <initializer_list>
#include <bits/functional_hash.h>
#endif
+#ifndef _GLIBCXX_ALWAYS_INLINE
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -1630,4 +1630,6 @@ _GLIBCXX_END_NAMESPACE_CONTAINER
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif
diff --git a/libstdc++-v3/include/std/barrier b/libstdc++-v3/include/std/barrier
index 8e03a5820c6..5aaffa62086 100644
--- a/libstdc++-v3/include/std/barrier
+++ b/libstdc++-v3/include/std/barrier
@@ -52,6 +52,10 @@
#include <array>
+#ifndef _GLIBCXX_ALWAYS_INLINE
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -261,5 +265,9 @@ It looks different from literature pseudocode for two main reasons:
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif // __cpp_lib_barrier
+
#endif // _GLIBCXX_BARRIER
diff --git a/libstdc++-v3/include/std/latch b/libstdc++-v3/include/std/latch
index 27cd80d7100..0548ddd67ae 100644
--- a/libstdc++-v3/include/std/latch
+++ b/libstdc++-v3/include/std/latch
@@ -40,6 +40,10 @@
#include <bits/atomic_base.h>
#include <ext/numeric_traits.h>
+#ifndef _GLIBCXX_ALWAYS_INLINE
+#define _GLIBCXX_ALWAYS_INLINE inline __attribute__((__always_inline__))
+#endif
+
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
@@ -90,5 +94,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
};
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
+
+#undef _GLIBCXX_ALWAYS_INLINE
+
#endif // __cpp_lib_latch
#endif // _GLIBCXX_LATCH
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-15 5:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-15 5:54 [gcc(refs/users/aoliva/heads/testme)] libstdc++: define and undefine always_inline macro wherever used Alexandre Oliva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).