remove inside_generic hack
define uint64_t and int64_t as 'long' instead of 'long long' when __LP64__ is define.
This commit is contained in:
parent
4b3c6e74ab
commit
b72cddaa6e
2 changed files with 8 additions and 7 deletions
|
@ -13,12 +13,20 @@ typedef __SIZE_TYPE__ uintptr_t;
|
||||||
typedef signed char int8_t;
|
typedef signed char int8_t;
|
||||||
typedef signed short int int16_t;
|
typedef signed short int int16_t;
|
||||||
typedef signed int int32_t;
|
typedef signed int int32_t;
|
||||||
|
#ifdef __LP64__
|
||||||
|
typedef signed long int int64_t;
|
||||||
|
#else
|
||||||
typedef signed long long int int64_t;
|
typedef signed long long int int64_t;
|
||||||
|
#endif
|
||||||
typedef unsigned char uint8_t;
|
typedef unsigned char uint8_t;
|
||||||
typedef unsigned short int uint16_t;
|
typedef unsigned short int uint16_t;
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
|
#ifdef __LP64__
|
||||||
|
typedef unsigned long int uint64_t;
|
||||||
|
#else
|
||||||
typedef unsigned long long int uint64_t;
|
typedef unsigned long long int uint64_t;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL ((void*)0)
|
#define NULL ((void*)0)
|
||||||
|
|
7
tccgen.c
7
tccgen.c
|
@ -42,7 +42,6 @@ ST_DATA Sym *local_label_stack;
|
||||||
static int local_scope;
|
static int local_scope;
|
||||||
static int in_sizeof;
|
static int in_sizeof;
|
||||||
static int section_sym;
|
static int section_sym;
|
||||||
static int inside_generic;
|
|
||||||
|
|
||||||
ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */
|
ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */
|
||||||
ST_DATA int vla_sp_root_loc; /* vla_sp_loc for SP before any VLAs were pushed */
|
ST_DATA int vla_sp_root_loc; /* vla_sp_loc for SP before any VLAs were pushed */
|
||||||
|
@ -2737,10 +2736,6 @@ static int compare_types(CType *type1, CType *type2, int unqualified)
|
||||||
t2 &= ~(VT_CONSTANT | VT_VOLATILE);
|
t2 &= ~(VT_CONSTANT | VT_VOLATILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inside_generic) {
|
|
||||||
t1 &= ~VT_LONG;
|
|
||||||
t2 &= ~VT_LONG;
|
|
||||||
}
|
|
||||||
/* Default Vs explicit signedness only matters for char */
|
/* Default Vs explicit signedness only matters for char */
|
||||||
if ((t1 & VT_BTYPE) != VT_BYTE) {
|
if ((t1 & VT_BTYPE) != VT_BYTE) {
|
||||||
t1 &= ~VT_DEFSIGN;
|
t1 &= ~VT_DEFSIGN;
|
||||||
|
@ -4939,7 +4934,6 @@ ST_FUNC void unary(void)
|
||||||
|
|
||||||
next();
|
next();
|
||||||
skip('(');
|
skip('(');
|
||||||
inside_generic = 1;
|
|
||||||
expr_type(&controlling_type, expr_eq);
|
expr_type(&controlling_type, expr_eq);
|
||||||
controlling_type.t &= ~(VT_CONSTANT | VT_VOLATILE | VT_ARRAY);
|
controlling_type.t &= ~(VT_CONSTANT | VT_VOLATILE | VT_ARRAY);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -4984,7 +4978,6 @@ ST_FUNC void unary(void)
|
||||||
}
|
}
|
||||||
begin_macro(str, 1);
|
begin_macro(str, 1);
|
||||||
next();
|
next();
|
||||||
inside_generic = 0;
|
|
||||||
expr_eq();
|
expr_eq();
|
||||||
if (tok != TOK_EOF)
|
if (tok != TOK_EOF)
|
||||||
expect(",");
|
expect(",");
|
||||||
|
|
Loading…
Reference in a new issue