From 8e8837737a8c1e88634a501092969c86faa0b2f9 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Wed, 24 Jun 2009 18:01:02 +0200 Subject: [PATCH] Be a little less overzealous with arrays of void-initialized typedefs; initialize `new VoidTD[][](2)` and `new VoidTD[][][](2, 3)` (but not `new VoidTD[2][3]`, which is a dynamic array of static arrays of void-initialized typedefs). --- gen/arrays.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/arrays.cpp b/gen/arrays.cpp index fc364228..eab6cc05 100644 --- a/gen/arrays.cpp +++ b/gen/arrays.cpp @@ -399,9 +399,9 @@ LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr) ////////////////////////////////////////////////////////////////////////////////////////// static bool isInitialized(Type* et) { - // Strip array types from element type + // Strip static array types from element type Type* bt = et->toBasetype(); - while (bt->ty == Tsarray || bt->ty == Tarray) { + while (bt->ty == Tsarray) { et = bt->nextOf(); bt = et->toBasetype(); }