History

remove inside_generic hack

define uint64_t and int64_t as 'long' instead of 'long long' when __LP64__ is define.

Matthias Gatto committed 9 years ago

Commit b72cdda1 parent 4b3c6e72 files · +8 −7Browse files

Unified · Split

2 files
  1. include/stddef.h +8 −0
  2. tccgen.c +0 −7
include/stddef.h+8−0
@@ -13,12 +13,20 @@ typedef __SIZE_TYPE__ uintptr_t; · 12 unmodified lines
1313 typedef signed char int8_t;
1414 typedef signed short int int16_t;
1515 typedef signed int int32_t;
16+#ifdef __LP64__
17+typedef signed long int int64_t;
18+#else
1619 typedef signed long long int int64_t;
20+#endif
1721 typedef unsigned char uint8_t;
1822 typedef unsigned short int uint16_t;
1923 typedef unsigned int uint32_t;
24+#ifdef __LP64__
25+typedef unsigned long int uint64_t;
26+#else
2027 typedef unsigned long long int uint64_t;
2128 #endif
29+#endif
2230
2331 #ifndef NULL
2432 #define NULL ((void*)0)
tccgen.c+0−7
@@ -42,7 +42,6 @@ ST_DATA Sym *local_label_stack; · 41 unmodified lines
4242 static int local_scope;
4343 static int in_sizeof;
4444 static int section_sym;
45−static int inside_generic;
4645
4746 ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */
4847 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
27372736 t2 &= ~(VT_CONSTANT | VT_VOLATILE);
27382737 }
27392738
2740− if (!inside_generic) {
2741− t1 &= ~VT_LONG;
2742− t2 &= ~VT_LONG;
2743− }
27442739 /* Default Vs explicit signedness only matters for char */
27452740 if ((t1 & VT_BTYPE) != VT_BYTE) {
27462741 t1 &= ~VT_DEFSIGN;
@@ -4939,7 +4934,6 @@ ST_FUNC void unary(void) · 2192 unmodified lines
49394934
49404935 next();
49414936 skip('(');
4942− inside_generic = 1;
49434937 expr_type(&controlling_type, expr_eq);
49444938 controlling_type.t &= ~(VT_CONSTANT | VT_VOLATILE | VT_ARRAY);
49454939 for (;;) {
@@ -4984,7 +4978,6 @@ ST_FUNC void unary(void) · 38 unmodified lines
49844978 }
49854979 begin_macro(str, 1);
49864980 next();
4987− inside_generic = 0;
49884981 expr_eq();
49894982 if (tok != TOK_EOF)
49904983 expect(",");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t