allow initializing shadowed locals outside of -std=gmqcc - in this case it becomes a regular assignment to the old declaration which is consistent with fteqcc

This commit is contained in:
Wolfgang Bumiller 2013-08-28 14:20:33 +02:00
parent 71e7db63aa
commit 494c30a239

View file

@ -5112,8 +5112,12 @@ static bool parse_variable(parser_t *parser, ast_block *localblock, bool nofield
}
if (OPTS_OPTION_U32(OPTION_STANDARD) != COMPILER_GMQCC) {
ast_delete(var);
var = NULL;
goto skipvar;
if (ast_istype(old, ast_value))
var = (ast_value*)old;
else {
var = NULL;
goto skipvar;
}
}
}
}