Skip to content

Commit

Permalink
Merge pull request #4459 from MartinNowak/undoNothrowSync
Browse files Browse the repository at this point in the history
roll back nothrow for synchronized (mtx)
  • Loading branch information
WalterBright committed Mar 9, 2015
2 parents 2a9b755 + b977e1e commit 2f27180
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statement.c
Expand Up @@ -4208,12 +4208,12 @@ Statement *SynchronizedStatement::semantic(Scope *sc)
Parameters* args = new Parameters;
args->push(new Parameter(0, ClassDeclaration::object->type, NULL, NULL));

FuncDeclaration *fdenter = FuncDeclaration::genCfunc(args, Type::tvoid, Id::monitorenter, STCnothrow);
FuncDeclaration *fdenter = FuncDeclaration::genCfunc(args, Type::tvoid, Id::monitorenter);
Expression *e = new CallExp(loc, new VarExp(loc, fdenter), new VarExp(loc, tmp));
e->type = Type::tvoid; // do not run semantic on e
cs->push(new ExpStatement(loc, e));

FuncDeclaration *fdexit = FuncDeclaration::genCfunc(args, Type::tvoid, Id::monitorexit, STCnothrow);
FuncDeclaration *fdexit = FuncDeclaration::genCfunc(args, Type::tvoid, Id::monitorexit);
e = new CallExp(loc, new VarExp(loc, fdexit), new VarExp(loc, tmp));
e->type = Type::tvoid; // do not run semantic on e
Statement *s = new ExpStatement(loc, e);
Expand Down

0 comments on commit 2f27180

Please sign in to comment.