diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-05-26 11:14:38 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-05-26 11:14:38 -0700 |
commit | 5b76fa26c936ae3c566ce7cb7122722b88f50d3c (patch) | |
tree | fef2a4a1d19da406843b0bec8cce672bf995d976 /preproc.c | |
parent | c4147f1fcc814af7ccdc761c12cbfe7c01a61948 (diff) | |
download | nasm-5b76fa26c936ae3c566ce7cb7122722b88f50d3c.tar.gz |
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.
Diffstat (limited to 'preproc.c')
-rw-r--r-- | preproc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 { |