define uint64_t and int64_t as 'long' instead of 'long long' when __LP64__ is define.
Unified · Split
| @@ -13,12 +13,20 @@ typedef __SIZE_TYPE__ uintptr_t; · 12 unmodified lines | ||
| 13 | 13 | typedef signed char int8_t; |
| 14 | 14 | typedef signed short int int16_t; |
| 15 | 15 | typedef signed int int32_t; |
| 16 | +#ifdef __LP64__ | |
| 17 | +typedef signed long int int64_t; | |
| 18 | +#else | |
| 16 | 19 | typedef signed long long int int64_t; |
| 20 | +#endif | |
| 17 | 21 | typedef unsigned char uint8_t; |
| 18 | 22 | typedef unsigned short int uint16_t; |
| 19 | 23 | typedef unsigned int uint32_t; |
| 24 | +#ifdef __LP64__ | |
| 25 | +typedef unsigned long int uint64_t; | |
| 26 | +#else | |
| 20 | 27 | typedef unsigned long long int uint64_t; |
| 21 | 28 | #endif |
| 29 | +#endif | |
| 22 | 30 | |
| 23 | 31 | #ifndef NULL |
| 24 | 32 | #define NULL ((void*)0) |
| @@ -42,7 +42,6 @@ ST_DATA Sym *local_label_stack; · 41 unmodified lines | ||
| 42 | 42 | static int local_scope; |
| 43 | 43 | static int in_sizeof; |
| 44 | 44 | static int section_sym; |
| 45 | −static int inside_generic; | |
| 46 | 45 | |
| 47 | 46 | ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */ |
| 48 | 47 | 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) · 2688 unmodified lines | ||
| 2737 | 2736 | t2 &= ~(VT_CONSTANT | VT_VOLATILE); |
| 2738 | 2737 | } |
| 2739 | 2738 | |
| 2740 | − if (!inside_generic) { | |
| 2741 | − t1 &= ~VT_LONG; | |
| 2742 | − t2 &= ~VT_LONG; | |
| 2743 | − } | |
| 2744 | 2739 | /* Default Vs explicit signedness only matters for char */ |
| 2745 | 2740 | if ((t1 & VT_BTYPE) != VT_BYTE) { |
| 2746 | 2741 | t1 &= ~VT_DEFSIGN; |
| @@ -4939,7 +4934,6 @@ ST_FUNC void unary(void) · 2192 unmodified lines | ||
| 4939 | 4934 | |
| 4940 | 4935 | next(); |
| 4941 | 4936 | skip('('); |
| 4942 | − inside_generic = 1; | |
| 4943 | 4937 | expr_type(&controlling_type, expr_eq); |
| 4944 | 4938 | controlling_type.t &= ~(VT_CONSTANT | VT_VOLATILE | VT_ARRAY); |
| 4945 | 4939 | for (;;) { |
| @@ -4984,7 +4978,6 @@ ST_FUNC void unary(void) · 38 unmodified lines | ||
| 4984 | 4978 | } |
| 4985 | 4979 | begin_macro(str, 1); |
| 4986 | 4980 | next(); |
| 4987 | − inside_generic = 0; | |
| 4988 | 4981 | expr_eq(); |
| 4989 | 4982 | if (tok != TOK_EOF) |
| 4990 | 4983 | expect(","); |