Skip to content

Commit

Permalink
Don't shadow variable 't' in FuncDeclaration::semantic3
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Nov 8, 2013
1 parent e27ee2d commit dda19a6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/func.c
Expand Up @@ -1028,8 +1028,6 @@ void FuncDeclaration::semantic3(Scope *sc)
// Declare hidden variable _arguments[] and _argptr
if (f->varargs == 1)
{
Type *t;

#ifndef IN_GCC
if (global.params.is64bit && !global.params.isWindows)
{ // Declare save area for varargs registers
Expand Down Expand Up @@ -1058,16 +1056,16 @@ void FuncDeclaration::semantic3(Scope *sc)
sc2->insert(v_arguments);
v_arguments->parent = this;

//t = Type::typeinfo->type->constOf()->arrayOf();
t = Type::dtypeinfo->type->arrayOf();
//Type *t = Type::typeinfo->type->constOf()->arrayOf();
Type *t = Type::dtypeinfo->type->arrayOf();
_arguments = new VarDeclaration(Loc(), t, Id::_arguments, NULL);
_arguments->semantic(sc2);
sc2->insert(_arguments);
_arguments->parent = this;
}
if (f->linkage == LINKd || (f->parameters && Parameter::dim(f->parameters)))
{ // Declare _argptr
t = Type::tvalist;
Type *t = Type::tvalist;
argptr = new VarDeclaration(Loc(), t, Id::_argptr, NULL);
argptr->semantic(sc2);
sc2->insert(argptr);
Expand Down

0 comments on commit dda19a6

Please sign in to comment.