Mercurial > projects > ldc
diff dmd/statement.c @ 1530:05c235309d6f
Make the auto storage class never have the same meaning as scope.
This changes the meaning of
auto class MyClass {} and
auto MyClass ident;
Both have been made an error to prevent accidents.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 12 Jul 2009 16:15:21 +0200 |
parents | 17268b0a3ab0 |
children | def7a1d494fd |
line wrap: on
line diff
--- a/dmd/statement.c Fri Jul 10 21:30:02 2009 +0200 +++ b/dmd/statement.c Sun Jul 12 16:15:21 2009 +0200 @@ -333,7 +333,7 @@ if (v) { Expression *e; - e = v->callAutoDtor(); + e = v->callScopeDtor(); if (e) { //printf("dtor is: "); e->print(); @@ -1590,7 +1590,7 @@ { VarDeclaration *v; v = new VarDeclaration(loc, tret, Id::result, NULL); - v->noauto = 1; + v->noscope = 1; v->semantic(sc); if (!sc->insert(v)) assert(0); @@ -1961,7 +1961,7 @@ Type *t = arg->type ? arg->type : condition->type; match = new VarDeclaration(loc, t, arg->ident, NULL); - match->noauto = 1; + match->noscope = 1; match->semantic(scd); if (!scd->insert(match)) assert(0); @@ -2931,7 +2931,7 @@ if (!fd->vresult) { // Declare vresult VarDeclaration *v = new VarDeclaration(loc, tret, Id::result, NULL); - v->noauto = 1; + v->noscope = 1; v->semantic(scx); if (!scx->insert(v)) assert(0);