Skip to content

Commit 2e3f65c

Browse files
committed
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]>
1 parent b3d46e1 commit 2e3f65c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/gcc-plugins/gcc-common.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,4 +440,8 @@ static inline void debug_gimple_stmt(const_gimple s)
440440
#define SET_DECL_MODE(decl, mode) DECL_MODE(decl) = (mode)
441441
#endif
442442

443+
#if BUILDING_GCC_VERSION >= 14000
444+
#define last_stmt(x) last_nondebug_stmt(x)
445+
#endif
446+
443447
#endif

0 commit comments

Comments
 (0)