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