switch: fix label sorting
This commit is contained in:
8
tccgen.c
8
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user