From 5b76fa26c936ae3c566ce7cb7122722b88f50d3c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 26 May 2008 11:14:38 -0700 Subject: [PATCH] preproc.c: prevent the compiler from reducing enum pp_token_type The compiler is free to store enum pp_token_type into any size integer small enough to contain all the values up to 2^n-1 for the smallest n which contains all the values. Force it to size it to integer size, since we use it to hold macro positional parameters. --- preproc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preproc.c b/preproc.c index ab5fff7b..8598beed 100644 --- a/preproc.c +++ b/preproc.c @@ -158,7 +158,8 @@ enum pp_token_type { TOK_NUMBER, TOK_FLOAT, TOK_SMAC_END, TOK_OTHER, TOK_INTERNAL_STRING, TOK_PREPROC_Q, TOK_PREPROC_QQ, - TOK_SMAC_PARAM /* MUST BE LAST IN THE LIST!!! */ + TOK_SMAC_PARAM, /* MUST BE LAST IN THE LIST!!! */ + TOK_MAX = INT_MAX /* Keep compiler from reducing the range */ }; struct Token { -- 2.11.4.GIT