Add _d_newarrayvT and _d_newarraymvT to create arrays without initialization.

Adjust DtoNewDynArray to use DtoArrayInit for initialization of new arrays.
Make Type::tvoid->defaultInit() not error.
This commit is contained in:
Christian Kamm
2008-09-14 10:13:50 +02:00
parent e0635f1707
commit 30c9af1945
6 changed files with 118 additions and 22 deletions

View File

@@ -1375,6 +1375,9 @@ Expression *TypeBasic::defaultInit(Loc loc)
#endif
switch (ty)
{
case Tvoid:
return new IntegerExp(loc, value, Type::tbool);
case Tchar:
value = 0xFF;
break;