aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tccgen.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/tccgen.c b/tccgen.c
index 1efbc1f..8aa86f3 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -81,7 +81,6 @@ static void block(int *bsym, int *csym, int is_expr);
static void decl_initializer_alloc(CType *type, AttributeDef *ad, int r, int has_init, int v, int scope);
static int decl0(int l, int is_for_loop_init);
static void expr_eq(void);
-static void expr_lor_const(void);
static void unary_type(CType *type);
static void vla_runtime_type_size(CType *type, int *a);
static void vla_sp_restore(void);
@@ -4512,10 +4511,8 @@ ST_FUNC void unary(void)
skip('(');
expr_eq();
skip(',');
- nocode_wanted++;
- expr_lor_const();
+ expr_eq();
vpop();
- nocode_wanted--;
skip(')');
}
break;
@@ -4566,7 +4563,7 @@ ST_FUNC void unary(void)
next();
skip('(');
nocode_wanted++;
- gexpr();
+ expr_eq();
res = (vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST;
vpop();
nocode_wanted--;
@@ -5056,26 +5053,6 @@ static void expr_or(void)
}
}
-/* XXX: fix this mess */
-static void expr_land_const(void)
-{
- expr_or();
- while (tok == TOK_LAND) {
- next();
- expr_or();
- gen_op(TOK_LAND);
- }
-}
-static void expr_lor_const(void)
-{
- expr_land_const();
- while (tok == TOK_LOR) {
- next();
- expr_land_const();
- gen_op(TOK_LOR);
- }
-}
-
static void expr_land(void)
{
expr_or();