commit 9051e2b39dc3488b33c454ec375465471f3c3eb6
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Sat Jul 18 10:54:18 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Sat Jul 18 10:54:18 2015 +0200

    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.

diff --git a/cc1/decl.c b/cc1/decl.c
index ded6ee4..565b5f3 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -39,8 +39,14 @@ queue(struct dcldata *dp, unsigned op, short nelem, void 
*data)
 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);
 }
 

Reply via email to