commit 512947a3cc497cee5e4f5c0aa3f17f81fa2bb18b Author: jiang Date: Mon Jun 16 16:43:40 2014 +0800 #define bug fixes bug: #define hexCh(c (c >= 10 ? 'a' + c - 10 : '0' + c) hexCh(c); diff --git a/tccpp.c b/tccpp.c index 053fd57..dfbc857 100644 --- a/tccpp.c +++ b/tccpp.c @@ -1253,16 +1253,15 @@ ST_FUNC void parse_define(void) next_nomacro(); } if (varg < TOK_IDENT) - tcc_error("badly punctuated parameter list"); + tcc_error("may not appear in macro parameter list: \"%s\"", get_tok_str(varg, NULL)); s = sym_push2(&define_stack, varg | SYM_FIELD, is_vaargs, 0); *ps = s; ps = &s->next; if (tok != ',') - break; + continue; next_nomacro(); } - if (tok == ')') - next_nomacro_spc(); + next_nomacro_spc(); t = MACRO_FUNC; } tok_str_new(&str);