From fc424c9f7b886f5ef9e6a9b5f34b3f5b04233ce3 Mon Sep 17 00:00:00 2001 From: Aleksi Hannula Date: Fri, 28 Nov 2025 16:05:08 +0200 Subject: [PATCH] Reorder "pure" attribute Placing the definition of "pure" prior to TOK_DEFINE would cause it to be treated as a keyword by tccgen. This breaks building gcc, in which "pure" is used as a struct field name. --- tcctok.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcctok.h b/tcctok.h index 0f1cb6d3..49dce0b2 100644 --- a/tcctok.h +++ b/tcctok.h @@ -23,8 +23,6 @@ DEF(TOK_CONST1, "const") DEF(TOK_CONST2, "__const") /* gcc keyword */ DEF(TOK_CONST3, "__const__") /* gcc keyword */ - DEF(TOK_PURE1, "pure") - DEF(TOK_PURE2, "__pure__") DEF(TOK_VOLATILE1, "volatile") DEF(TOK_VOLATILE2, "__volatile") /* gcc keyword */ DEF(TOK_VOLATILE3, "__volatile__") /* gcc keyword */ @@ -147,6 +145,8 @@ DEF(TOK_ALWAYS_INLINE1, "always_inline") DEF(TOK_ALWAYS_INLINE2, "__always_inline__") DEF(TOK_NOINLINE, "__noinline__") + DEF(TOK_PURE1, "pure") + DEF(TOK_PURE2, "__pure__") DEF(TOK_MODE, "__mode__") DEF(TOK_MODE_QI, "__QI__")