aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-04-13 03:52:07 +0300
committerseyko <seyko2@gmail.com>2016-04-13 03:52:07 +0300
commit131d776d662372747dbec2aebcee5067e62e12ea (patch)
tree3550668089a4e67840be8a34d923ca8622ed712c /tccpp.c
parent174d06a3ff549702d1c7b9df6ce7a096801ba3ae (diff)
downloadtinycc-131d776d662372747dbec2aebcee5067e62e12ea.tar.gz
tinycc-131d776d662372747dbec2aebcee5067e62e12ea.tar.bz2
revert of the 'Identifiers can start and/or contain'
When tccboot kernels compiles with 'Identifiers can start and/or', this kernel don't start. It is hard to find what is wrong. PS: there was no test for identifiers in *.S with '.'
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/tccpp.c b/tccpp.c
index 80c7dd8..b892b2e 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -1328,9 +1328,6 @@ ST_FUNC void parse_define(void)
parse_flags |= PARSE_FLAG_SPACES;
next_nomacro_spc();
if (tok == '(') {
- /* must be able to parse TOK_DOTS (in asm mode '.' can be part of identifier) */
- parse_flags &= ~PARSE_FLAG_ASM_FILE;
- isidnum_table['.' - CH_EOF] = 0;
next_nomacro();
ps = &first;
if (tok != ')') for (;;) {
@@ -1358,9 +1355,6 @@ ST_FUNC void parse_define(void)
}
next_nomacro_spc();
t = MACRO_FUNC;
- parse_flags |= (saved_parse_flags & PARSE_FLAG_ASM_FILE);
- isidnum_table['.' - CH_EOF] =
- (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
}
tok_str_new(&str);
spc = 2;
@@ -2511,8 +2505,7 @@ maybe_newline:
p--;
PEEKC(c, p);
parse_ident_slow:
- while (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
- {
+ while (isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM)) {
cstr_ccat(&tokcstr, c);
PEEKC(c, p);
}
@@ -2571,7 +2564,7 @@ maybe_newline:
cstr_reset(&tokcstr);
cstr_ccat(&tokcstr, '.');
goto parse_num;
- } else if (parse_flags & PARSE_FLAG_ASM_FILE) {
+ } else if ((isidnum_table['.' - CH_EOF] & IS_ID) != 0) { /* asm mode */
*--p = c = '.';
goto parse_ident_fast;
} else if (c == '.') {
@@ -3368,9 +3361,6 @@ ST_FUNC void preprocess_init(TCCState *s1)
isidnum_table['$' - CH_EOF] =
tcc_state->dollars_in_identifiers ? IS_ID : 0;
-
- isidnum_table['.' - CH_EOF] =
- (parse_flags & PARSE_FLAG_ASM_FILE) ? IS_ID : 0;
}
ST_FUNC void preprocess_new(void)