fix line number in macro redefined message
This commit is contained in:
parent
a37f8cfc80
commit
0f36f60faa
1 changed files with 5 additions and 2 deletions
7
tccpp.c
7
tccpp.c
|
@ -1262,8 +1262,11 @@ ST_INLN void define_push(int v, int macro_type, TokenString *str, Sym *first_arg
|
||||||
s->next = first_arg;
|
s->next = first_arg;
|
||||||
table_ident[v - TOK_IDENT]->sym_define = s;
|
table_ident[v - TOK_IDENT]->sym_define = s;
|
||||||
|
|
||||||
if (o && !macro_is_equal(o->d, s->d))
|
if (o && !macro_is_equal(o->d, s->d)) {
|
||||||
tcc_warning("%s redefined", get_tok_str(v, NULL));
|
file->line_num--;
|
||||||
|
tcc_warning("%s redefined", get_tok_str(v, NULL));
|
||||||
|
file->line_num++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* undefined a define symbol. Its name is just set to zero */
|
/* undefined a define symbol. Its name is just set to zero */
|
||||||
|
|
Loading…
Add table
Reference in a new issue