From: Matthias Braun Date: Thu, 11 Jun 2009 09:30:26 +0000 (+0000) Subject: fix cp_error059 X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=b91bda04bf51d0d4228dc3cc6ef4e00993452732;p=cparser fix cp_error059 [r26129] --- diff --git a/parser.c b/parser.c index 97078ca..1686f34 100644 --- a/parser.c +++ b/parser.c @@ -6574,8 +6574,9 @@ static expression_t *parse_reference(void) } if (entity->base.parent_scope != file_scope - && (current_function != NULL && entity->base.parent_scope->depth < current_function->parameters.depth) - && is_type_valid(orig_type) && !is_type_function(orig_type)) { + && (current_function != NULL + && entity->base.parent_scope->depth < current_function->parameters.depth) + && (entity->kind == ENTITY_VARIABLE || entity->kind == ENTITY_PARAMETER)) { if (entity->kind == ENTITY_VARIABLE) { /* access of a variable from an outer function */ entity->variable.address_taken = true;