Fixed bug in static

git-svn-id: http://picoc.googlecode.com/svn/trunk@548 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2011-02-17 06:19:08 +00:00
parent a2cb2e2efd
commit fbe799d63f

View file

@ -204,7 +204,8 @@ struct Value *VariableDefineButIgnoreIdentical(struct ParseState *Parser, char *
if (!TableGet(&GlobalTable, RegisteredMangledName, &ExistingValue, &DeclFileName, &DeclLine, &DeclColumn))
{
/* define the mangled-named static variable store in the global scope */
ExistingValue = VariableDefine(Parser, (char *)RegisteredMangledName, NULL, Typ, TRUE);
ExistingValue = VariableAllocValueFromType(Parser, Typ, TRUE, NULL, TRUE);
TableSet(&GlobalTable, (char *)RegisteredMangledName, ExistingValue, (char *)Parser->FileName, Parser->Line, Parser->CharacterPos);
*FirstVisit = TRUE;
}