Ignore type declarations when checking for const attributes.
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 10 Dec 2007 19:36:03 +0000 (19:36 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 10 Dec 2007 19:36:03 +0000 (19:36 +0000)
[r18663]

parser.c

index d708eb5..13197ca 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4379,6 +4379,9 @@ static bool has_const_fields(const compound_type_t *type)
        const declaration_t *declaration = context->declarations;
 
        for (; declaration != NULL; declaration = declaration->next) {
+               if (declaration->namespc != NAMESPACE_NORMAL)
+                       continue;
+
                const type_t *decl_type = skip_typeref(declaration->type);
                if (decl_type->base.qualifiers & TYPE_QUALIFIER_CONST)
                        return true;