* [PATCH] gcc-plugins: Rename last_stmt() for GCC 14+
@ 2023-08-11 6:05 Kees Cook
0 siblings, 0 replies; only message in thread
From: Kees Cook @ 2023-08-11 6:05 UTC (permalink / raw)
To: linux-hardening; +Cc: Kees Cook, linux-kernel
In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper
macro to handle the renaming.
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
scripts/gcc-plugins/gcc-common.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/gcc-plugins/gcc-common.h b/scripts/gcc-plugins/gcc-common.h
index 84c730da36dd..1ae39b9f4a95 100644
--- a/scripts/gcc-plugins/gcc-common.h
+++ b/scripts/gcc-plugins/gcc-common.h
@@ -440,4 +440,8 @@ static inline void debug_gimple_stmt(const_gimple s)
#define SET_DECL_MODE(decl, mode) DECL_MODE(decl) = (mode)
#endif
+#if BUILDING_GCC_VERSION >= 14000
+#define last_stmt(x) last_nondebug_stmt(x)
+#endif
+
#endif
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-11 6:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11 6:05 [PATCH] gcc-plugins: Rename last_stmt() for GCC 14+ Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox