diff options
| author | Kees Cook <[email protected]> | 2023-08-07 16:41:19 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2023-08-11 06:10:09 +0000 |
| commit | 2e3f65ccfe6b0778b261ad69c9603ae85f210334 (patch) | |
| tree | 204eba0ca5cf74d6aac93c9e2799bf45b957a7c9 /scripts/gcc-plugins/gcc-common.h | |
| parent | selftests/harness: Actually report SKIP for signal tests (diff) | |
| download | kernel-2e3f65ccfe6b0778b261ad69c9603ae85f210334.tar.gz kernel-2e3f65ccfe6b0778b261ad69c9603ae85f210334.zip | |
gcc-plugins: Rename last_stmt() for GCC 14+
In GCC 14, last_stmt() was renamed to last_nondebug_stmt(). Add a helper
macro to handle the renaming.
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
| -rw-r--r-- | scripts/gcc-plugins/gcc-common.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
