From 58a8711bc199bb92891b782ac4f80a35c853d4d0 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Thu, 26 Feb 2009 15:24:20 +0100 Subject: [PATCH] Fixed const/invariant struc/class fields of the form const int i = 4; they don't add a field. --- gen/toobj.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen/toobj.cpp b/gen/toobj.cpp index 24d18efa..603cea53 100644 --- a/gen/toobj.cpp +++ b/gen/toobj.cpp @@ -867,7 +867,12 @@ void VarDeclaration::toObjFile(int multiobj) } // global variable or magic +#if DMDV2 + // taken from dmd2/structs + if (isDataseg() || (storage_class & (STCconst | STCinvariant) && init)) +#else if (isDataseg()) +#endif { Logger::println("data segment");