changeset 993:27956b440c0a

Fixed const/invariant struc/class fields of the form const int i = 4; they don't add a field.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Thu, 26 Feb 2009 15:24:20 +0100
parents 6f5e40205f2a
children 18ad5601dff7
files gen/toobj.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toobj.cpp	Thu Feb 26 14:49:32 2009 +0100
+++ b/gen/toobj.cpp	Thu Feb 26 15:24:20 2009 +0100
@@ -867,7 +867,12 @@
     }
 
     // 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");