diff options
author | herman ten brugge <hermantenbrugge@home.nl> | 2024-01-08 11:34:47 +0100 |
---|---|---|
committer | herman ten brugge <hermantenbrugge@home.nl> | 2024-01-08 11:34:47 +0100 |
commit | 6120656cbf6d772fd30a18d5ba950d39c99ba226 (patch) | |
tree | 6138defe2628179e7f3dd94e466c3fb89d056639 | |
parent | 2701dcfb0673d910014c120c4bbca56417714984 (diff) |
Rewrite gexpr a bit
-rw-r--r-- | tccgen.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -6545,19 +6545,14 @@ static void expr_eq(void) ST_FUNC void gexpr(void) { - int comma_found = 0; - - while (1) { - expr_eq(); - if (comma_found) - convert_parameter_type (&vtop->type); - if (tok != ',') - break; + expr_eq(); + while (tok == ',') { constant_p &= (vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST && !((vtop->r & VT_SYM) && vtop->sym->a.addrtaken); - comma_found = 1; vpop(); next(); + expr_eq(); + convert_parameter_type (&vtop->type); } } |