Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2d05669c authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

gcc-plugins: Rename last_stmt() for GCC 14+



commit 2e3f65ccfe6b0778b261ad69c9603ae85f210334 upstream.

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: default avatarKees Cook <keescook@chromium.org>
Cc: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18b61cc1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -977,4 +977,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