Fix type handling for local variables.

This commit is contained in:
Bill Currie 2011-02-07 21:38:58 +09:00
parent 952a02eb23
commit ff70177041

View file

@ -737,7 +737,11 @@ decl
: function_decl : function_decl
| var_decl opt_initializer | var_decl opt_initializer
{ {
initialize_def ($1, $<spec>0.type, $2, current_symtab->space, specifier_t spec = $<spec>0;
type_t *type;
type = find_type (append_type ($1->type, spec.type));
initialize_def ($1, type, $2, current_symtab->space,
$<spec>0.storage); $<spec>0.storage);
} }
; ;