X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=parser.c;h=1686f34e6c5a9a0de68a855211185b52b5831aee;hb=22d24ddd2209686fa723a62ccc19b7c2eea2d172;hp=97078cafde5acf66ad59e1945c00091d7f81e3fb;hpb=233b4629181c4a07fbabe8566c10ce2bae9224de;p=cparser 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;