History

fix line number in macro redefined message

seyko committed 10 years ago

Commit 0f36f601 parent a37f8cf1 file · +5 −2Browse files

Unified · Split

tccpp.c+5−2
@@ -1262,8 +1262,11 @@ ST_INLN void define_push(int v, int macro_type, TokenString *str, Sym *first_arg · 1261 unmodified lines
1262 s->next = first_arg;1262 s->next = first_arg;
1263 table_ident[v - TOK_IDENT]->sym_define = s;1263 table_ident[v - TOK_IDENT]->sym_define = s;
1264 1264
1265 if (o && !macro_is_equal(o->d, s->d))1265 if (o && !macro_is_equal(o->d, s->d)) {
1266 tcc_warning("%s redefined", get_tok_str(v, NULL));1266 file->line_num--;
1267 tcc_warning("%s redefined", get_tok_str(v, NULL));
1268 file->line_num++;
1269 }
1267}1270}
1268 1271
1269/* undefined a define symbol. Its name is just set to zero */1272/* undefined a define symbol. Its name is just set to zero */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t