ref: 9051e2b39dc3488b33c454ec375465471f3c3eb6
parent: af498cdd3737f03a77ada5172fff1f727f463b10
author: Roberto E. Vargas Caballero <[email protected]>
date: Sat Jul 18 06:54:18 EDT 2015
Add size in array declarations At this point this is not a big help, because the type declared in this way is a not define type, so it cannot be used to declare variables, and arrays cannot be used in castig.
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -39,8 +39,14 @@
static struct dcldata *
arydcl(struct dcldata *dp)
{
+ Node *np = NULL;
+
expect('[');
+ np = (yytoken != ']') ? constexpr() : NULL;
expect(']');
+ /*
+ * TODO: Evaluate np.
+ */
return queue(dp, ARY, 0, NULL);
}