From ace0f7f2598f5e9d9d2ad8999e3140b8535d9459 Mon Sep 17 00:00:00 2001 From: Joe Soroka Date: Wed, 6 Apr 2011 09:17:03 -0700 Subject: re-apply VLA by Thomas Preud'homme --- tcc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index ae48047..be53b65 100644 --- a/tcc.h +++ b/tcc.h @@ -224,6 +224,7 @@ typedef struct Sym { union { long c; /* associated number */ int *d; /* define token stream */ + SValue *s; /* associated stack value */ }; CType type; /* associated type */ union { @@ -617,6 +618,7 @@ struct TCCState { #define VT_BTYPE 0x000f /* mask for basic type */ #define VT_UNSIGNED 0x0010 /* unsigned type */ #define VT_ARRAY 0x0020 /* array type (also has VT_PTR) */ +#define VT_VLA 0x20000 /* VLA type (also has VT_PTR and VT_ARRAY) */ #define VT_BITFIELD 0x0040 /* bitfield modifier */ #define VT_CONSTANT 0x0800 /* const modifier */ #define VT_VOLATILE 0x1000 /* volatile modifier */ @@ -631,7 +633,7 @@ struct TCCState { #define VT_EXPORT 0x00008000 /* win32: data exported from dll */ #define VT_WEAK 0x00010000 /* win32: data exported from dll */ -#define VT_STRUCT_SHIFT 17 /* shift for bitfield shift values */ +#define VT_STRUCT_SHIFT 18 /* shift for bitfield shift values */ /* type mask (except storage) */ #define VT_STORAGE (VT_EXTERN | VT_STATIC | VT_TYPEDEF | VT_INLINE | VT_IMPORT | VT_EXPORT | VT_WEAK) -- cgit v1.3.1