Fix linkage check for local variables in check_variable_type_complete().
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 1 Jan 2009 10:31:55 +0000 (10:31 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 1 Jan 2009 10:31:55 +0000 (10:31 +0000)
[r25014]

parser.c

index 3c0caf0..88ab74e 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -5353,7 +5353,8 @@ static void check_variable_type_complete(entity_t *ent)
        /* ยง6.7:7  If an identifier for an object is declared with no linkage, the
         *         type for the object shall be complete [...] */
        declaration_t *decl = &ent->declaration;
-       if (decl->storage_class != STORAGE_CLASS_NONE)
+       if (decl->storage_class == STORAGE_CLASS_EXTERN ||
+                       decl->storage_class == STORAGE_CLASS_STATIC)
                return;
 
        type_t *const orig_type = decl->type;