From 56ca3826deb50a0da70fdde606818ab6c899ed93 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 28 Jan 2009 10:07:59 +0000 Subject: [PATCH] Document evaluation of typedef with VLA declarator by citing the standard. [r25386] --- ast2firm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ast2firm.c b/ast2firm.c index 4b6dedb..e6ba6e9 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -4790,6 +4790,9 @@ static void declaration_statement_to_firm(declaration_statement_t *statement) if (is_declaration(entity)) { initialize_local_declaration(entity); } else if (entity->kind == ENTITY_TYPEDEF) { + /* §6.7.7:3 Any array size expressions associated with variable length + * array declarators are evaluated each time the declaration of the + * typedef name is reached in the order of execution. */ type_t *const type = skip_typeref(entity->typedefe.type); if (is_type_array(type) && type->array.is_vla) get_vla_size(&type->array); -- 2.20.1