aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@celest.fr>2011-01-15 17:50:55 +0100
committerThomas Preud'homme <thomas.preudhomme@celest.fr>2011-02-04 02:22:25 +0100
commita5a50eaafeea0d3ca47bc8fb6baf983743470c60 (patch)
tree3053095ca76b5ce12761dc7d312307c5a16400e2 /tcc.h
parentd35a3ac375473a584fa9dbb1320b5202a236a870 (diff)
downloadtinycc-a5a50eaafeea0d3ca47bc8fb6baf983743470c60.tar.gz
tinycc-a5a50eaafeea0d3ca47bc8fb6baf983743470c60.tar.bz2
Implement C99 Variable Length Arrays
Implement C99 Variable Length Arrays in tinycc: - Support VLA with multiple level (nested vla) - Update documentation with regards to VT_VLA - Add a testsuite in tcctest.c
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tcc.h b/tcc.h
index a3a9c78..22d79f0 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 {
@@ -616,6 +617,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 0x10000 /* 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 */