diff --git a/dmd/expression.c b/dmd/expression.c index 469f5be2..fa9eb749 100644 --- a/dmd/expression.c +++ b/dmd/expression.c @@ -3617,8 +3617,8 @@ Lagain: if (cd->aggNew) { - // Prepend the uint size argument to newargs[] - Expression *e = new IntegerExp(loc, cd->size(loc), Type::tuns32); + // Prepend the size_t size argument to newargs[] + Expression *e = new IntegerExp(loc, cd->size(loc), Type::tsize_t); if (!newargs) newargs = new Expressions(); newargs->shift(e); diff --git a/dmd/func.c b/dmd/func.c index cc13384b..9414d978 100644 --- a/dmd/func.c +++ b/dmd/func.c @@ -2818,13 +2818,13 @@ void NewDeclaration::semantic(Scope *sc) TypeFunction *tf = (TypeFunction *)type; if (Argument::dim(tf->parameters) < 1) { - error("at least one argument of type uint expected"); + error("at least one argument of type size_t expected"); } else { Argument *a = Argument::getNth(tf->parameters, 0); - if (!a->type->equals(Type::tuns32)) - error("first argument must be type uint, not %s", a->type->toChars()); + if (!a->type->equals(Type::tsize_t)) + error("first argument must be type size_t, not %s", a->type->toChars()); } FuncDeclaration::semantic(sc);