Mercurial > projects > ldc
diff gen/toobj.cpp @ 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 | 2667e3a145be |
children | 18ad5601dff7 |
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");