Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
View | Details | Raw Unified | Return to bug 145
Collapse All | Expand All

(-)a/gcc/d/dfrontend/declaration.c (-1 / +1 lines)
Lines 1605-1611 void VarDeclaration::semantic2(Scope *sc) Link Here
1605
        if ((type->ty == Tclass)&&type->isMutable()&&!type->isShared())
1605
        if ((type->ty == Tclass)&&type->isMutable()&&!type->isShared())
1606
        {
1606
        {
1607
            ExpInitializer *ei = init->isExpInitializer();
1607
            ExpInitializer *ei = init->isExpInitializer();
1608
            if (ei->exp->op == TOKclassreference)
1608
            if (ei && ei->exp->op == TOKclassreference)
1609
                error("is mutable. Only const or immutable class thread local variable are allowed, not %s", type->toChars());
1609
                error("is mutable. Only const or immutable class thread local variable are allowed, not %s", type->toChars());
1610
        }
1610
        }
1611
        else if (type->ty == Tpointer && type->nextOf()->ty == Tstruct && type->nextOf()->isMutable() &&!type->nextOf()->isShared())
1611
        else if (type->ty == Tpointer && type->nextOf()->ty == Tstruct && type->nextOf()->isMutable() &&!type->nextOf()->isShared())

Return to bug 145