diff options
| author | grischka <grischka> | 2008-05-10 06:07:55 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2008-09-12 02:36:05 +0200 |
| commit | 2c6cd08bcc1c33fe209ff2912b55b7cd31a75243 (patch) | |
| tree | ca33d2d07e1f17bf982926f62d315deec7708c45 /tcc.c | |
| parent | 1300cec38cc48405715416f107a65a4d7d608767 (diff) | |
| download | tinycc-2c6cd08bcc1c33fe209ff2912b55b7cd31a75243.tar.gz tinycc-2c6cd08bcc1c33fe209ff2912b55b7cd31a75243.tar.bz2 | |
fix isidnum_table for CH_EOF (-1)
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -398,7 +398,7 @@ static SValue vstack[VSTACK_SIZE], *vtop; /* some predefined types */ static CType char_pointer_type, func_old_type, int_type; /* true if isid(c) || isnum(c) */ -static unsigned char isidnum_table[256]; +static unsigned char isidnum_table[256-CH_EOF]; /* display some information during compilation */ static int verbose = 0; @@ -3772,7 +3772,7 @@ static inline void next_nomacro1(void) p++; for(;;) { c = *p; - if (!isidnum_table[c]) + if (!isidnum_table[c-CH_EOF]) break; h = TOK_HASH_FUNC(h, c); p++; @@ -3807,7 +3807,7 @@ static inline void next_nomacro1(void) p--; PEEKC(c, p); parse_ident_slow: - while (isidnum_table[c]) { + while (isidnum_table[c-CH_EOF]) { cstr_ccat(&tokcstr, c); PEEKC(c, p); } @@ -10114,8 +10114,8 @@ TCCState *tcc_new(void) s->output_type = TCC_OUTPUT_MEMORY; /* init isid table */ - for(i=0;i<256;i++) - isidnum_table[i] = isid(i) || isnum(i); + for(i=CH_EOF;i<256;i++) + isidnum_table[i-CH_EOF] = isid(i) || isnum(i); /* add all tokens */ table_ident = NULL; |
