aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tccgen.c b/tccgen.c
index 398e165..6f7cf1f 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -4881,8 +4881,12 @@ static void label_or_decl(int l)
decl(l);
}
-static int case_cmp(const void *a, const void *b)
-{ return (*(struct case_t**) a)->v1 - (*(struct case_t**) b)->v1; }
+static int case_cmp(const void *pa, const void *pb)
+{
+ int a = (*(struct case_t**) pa)->v1;
+ int b = (*(struct case_t**) pb)->v1;
+ return a < b ? -1 : a > b;
+}
static void block(int *bsym, int *csym, int is_expr)
{