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
13typedef signed char int8_t;13typedef signed char int8_t;
14typedef signed short int int16_t;14typedef signed short int int16_t;
15typedef signed int int32_t;15typedef signed int int32_t;
16#ifdef __LP64__
17typedef signed long int int64_t;
18#else
16typedef signed long long int int64_t;19typedef signed long long int int64_t;
20#endif
17typedef unsigned char uint8_t;21typedef unsigned char uint8_t;
18typedef unsigned short int uint16_t;22typedef unsigned short int uint16_t;
19typedef unsigned int uint32_t;23typedef unsigned int uint32_t;
24#ifdef __LP64__
25typedef unsigned long int uint64_t;
26#else
20typedef unsigned long long int uint64_t;27typedef unsigned long long int uint64_t;
21#endif28#endif
29#endif
22 30
23#ifndef NULL31#ifndef NULL
24#define NULL ((void*)0)32#define NULL ((void*)0)
tccgen.c+0−7
@@ -42,7 +42,6 @@ ST_DATA Sym *local_label_stack; · 41 unmodified lines
42static int local_scope;42static int local_scope;
43static int in_sizeof;43static int in_sizeof;
44static int section_sym;44static int section_sym;
45static int inside_generic;
46 45
47ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */46ST_DATA int vlas_in_scope; /* number of VLAs that are currently in scope */
48ST_DATA int vla_sp_root_loc; /* vla_sp_loc for SP before any VLAs were pushed */47ST_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(",");

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