Skip to content

Commit fc424c9

Browse files
committed
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.
1 parent 5b96aeb commit fc424c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tcctok.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
DEF(TOK_CONST1, "const")
2424
DEF(TOK_CONST2, "__const") /* gcc keyword */
2525
DEF(TOK_CONST3, "__const__") /* gcc keyword */
26-
DEF(TOK_PURE1, "pure")
27-
DEF(TOK_PURE2, "__pure__")
2826
DEF(TOK_VOLATILE1, "volatile")
2927
DEF(TOK_VOLATILE2, "__volatile") /* gcc keyword */
3028
DEF(TOK_VOLATILE3, "__volatile__") /* gcc keyword */
@@ -147,6 +145,8 @@
147145
DEF(TOK_ALWAYS_INLINE1, "always_inline")
148146
DEF(TOK_ALWAYS_INLINE2, "__always_inline__")
149147
DEF(TOK_NOINLINE, "__noinline__")
148+
DEF(TOK_PURE1, "pure")
149+
DEF(TOK_PURE2, "__pure__")
150150

151151
DEF(TOK_MODE, "__mode__")
152152
DEF(TOK_MODE_QI, "__QI__")

0 commit comments

Comments
 (0)