Fix 64bit enums and switch cases
See testcases. We now support 64bit case constants. At the same time also 64bit enum constants on L64 platforms (otherwise the Sym struct isn't large enough for now). The testcase also checks for various cases where sign/zero extension was confused.
This commit is contained in:
6
tcc.h
6
tcc.h
@ -1103,11 +1103,11 @@ ST_FUNC void cstr_reset(CString *cstr);
|
||||
ST_INLN void sym_free(Sym *sym);
|
||||
ST_FUNC Sym *sym_push2(Sym **ps, int v, int t, long c);
|
||||
ST_FUNC Sym *sym_find2(Sym *s, int v);
|
||||
ST_FUNC Sym *sym_push(int v, CType *type, int r, int c);
|
||||
ST_FUNC Sym *sym_push(int v, CType *type, int r, long c);
|
||||
ST_FUNC void sym_pop(Sym **ptop, Sym *b, int keep);
|
||||
ST_INLN Sym *struct_find(int v);
|
||||
ST_INLN Sym *sym_find(int v);
|
||||
ST_FUNC Sym *global_identifier_push(int v, int t, int c);
|
||||
ST_FUNC Sym *global_identifier_push(int v, int t, long c);
|
||||
|
||||
ST_FUNC void tcc_open_bf(TCCState *s1, const char *filename, int initlen);
|
||||
ST_FUNC int tcc_open(TCCState *s1, const char *filename);
|
||||
@ -1271,7 +1271,7 @@ ST_FUNC void test_lvalue(void);
|
||||
ST_FUNC void swap(int *p, int *q);
|
||||
ST_FUNC void vpushi(int v);
|
||||
ST_FUNC Sym *external_global_sym(int v, CType *type, int r);
|
||||
ST_FUNC void vset(CType *type, int r, int v);
|
||||
ST_FUNC void vset(CType *type, int r, long v);
|
||||
ST_FUNC void vswap(void);
|
||||
ST_FUNC void vpush_global_sym(CType *type, int v);
|
||||
ST_FUNC void vrote(SValue *e, int n);
|
||||
|
||||
Reference in New Issue
Block a user