From 78e9a140ff953aa0c1b451b6b46ddc6fd4e7d184 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Mon, 10 Dec 2007 19:36:03 +0000 Subject: [PATCH] Ignore type declarations when checking for const attributes. [r18663] --- parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/parser.c b/parser.c index d708eb5..13197ca 100644 --- 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; -- 2.20.1