commit a9f59c62a1ef80c97cbf32e3aa11410f7ef9f455
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu Aug 27 15:57:24 2015 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu Aug 27 15:57:24 2015 +0200

    Allow typedef of incomplete types

diff --git a/cc1/decl.c b/cc1/decl.c
index b87ff34..62ea6f1 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -572,8 +572,8 @@ identifier(struct decl *dcl)
        }
 
        /* TODO: Add warning about ANSI limits */
-       if (!tp->defined && sclass != EXTERN)
-               error("declared variable '%s' of incomplete type", name);
+       if (!tp->defined && sclass != EXTERN && sclass != TYPEDEF)
+               errorp("declared variable '%s' of incomplete type", name);
 
        if (tp->op == FTN) {
                if (sclass == NOSCLASS)

Reply via email to