From: Christoph Mallon Date: Mon, 10 Dec 2007 19:36:03 +0000 (+0000) Subject: Ignore type declarations when checking for const attributes. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=78e9a140ff953aa0c1b451b6b46ddc6fd4e7d184;p=cparser Ignore type declarations when checking for const attributes. [r18663] --- 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;