mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-07 23:43:13 +01:00
Fix another few issues caused by the upstream v2.063.1 retagging.
This commit is contained in:
@@ -1220,7 +1220,7 @@ Lnomatch:
|
||||
AggregateDeclaration *aad = parent->isAggregateDeclaration();
|
||||
if (aad)
|
||||
{
|
||||
#if DMDV2
|
||||
#if PULL93
|
||||
assert(!(storage_class & (STCextern | STCstatic | STCtls | STCgshared)));
|
||||
if (storage_class & (STCconst | STCimmutable) && init &&
|
||||
global.params.vfield)
|
||||
@@ -1229,6 +1229,16 @@ Lnomatch:
|
||||
const char *s = (storage_class & STCimmutable) ? "immutable" : "const";
|
||||
fprintf(stderr, "%s: %s.%s is %s field\n", p ? p : "", ad->toPrettyChars(), toChars(), s);
|
||||
}
|
||||
#else
|
||||
if (storage_class & (STCconst | STCimmutable) && init)
|
||||
{
|
||||
StorageClass stc = storage_class & (STCconst | STCimmutable);
|
||||
warning(loc, "%s field with initializer should be static, __gshared, or an enum",
|
||||
StorageClassDeclaration::stcToChars(NULL, stc));
|
||||
if (!tb->isTypeBasic())
|
||||
storage_class |= STCstatic;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
storage_class |= STCfield;
|
||||
@@ -1960,6 +1970,10 @@ AggregateDeclaration *VarDeclaration::isThis()
|
||||
if (!(storage_class & (STCstatic | STCextern | STCmanifest | STCtemplateparameter |
|
||||
STCtls | STCgshared | STCctfe)))
|
||||
{
|
||||
#if !PULL93
|
||||
if ((storage_class & (STCconst | STCimmutable | STCwild)) && init)
|
||||
return NULL;
|
||||
#endif
|
||||
for (Dsymbol *s = this; s; s = s->parent)
|
||||
{
|
||||
ad = s->isMember();
|
||||
|
||||
@@ -7565,7 +7565,9 @@ Expression *DotVarExp::semantic(Scope *sc)
|
||||
accessCheck(loc, sc, e1, var);
|
||||
|
||||
VarDeclaration *v = var->isVarDeclaration();
|
||||
#if PULL93
|
||||
if (v && (v->isDataseg() || (v->storage_class & STCmanifest)))
|
||||
#endif
|
||||
{
|
||||
Expression *e = expandVar(WANTvalue, v);
|
||||
if (e)
|
||||
|
||||
@@ -102,6 +102,7 @@ void unittests();
|
||||
#define DMDV2 1 // Version 2.0 features
|
||||
#define SNAN_DEFAULT_INIT DMDV2 // if floats are default initialized to signalling NaN
|
||||
#define MODULEINFO_IS_STRUCT DMDV2 // if ModuleInfo is a struct rather than a class
|
||||
#define PULL93 0 // controversial pull #93 for bugzilla 3449
|
||||
|
||||
// Set if C++ mangling is done by the front end
|
||||
#define CPP_MANGLE (DMDV2 && (TARGET_LINUX || TARGET_OSX || TARGET_FREEBSD || TARGET_OPENBSD || TARGET_SOLARIS || IN_LLVM))
|
||||
|
||||
Reference in New Issue
Block a user