Skip to content

Commit

Permalink
Change -v2 diagnostic message for volatile
Browse files Browse the repository at this point in the history
Sometimes volatile was used to prevent reordering in which case
synchronized may not be applicable. Threading is tricky so better
to not propose striaghtforward solution.
  • Loading branch information
Mihails Strasuns committed Jul 29, 2014
1 parent b735585 commit 69992ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.c
Expand Up @@ -3575,7 +3575,7 @@ Statement *Parser::parseStatement(int flags)
s = parseStatement(PSsemi | PScurlyscope);
if (global.params.Dversion >= 3 && mod && mod->isRoot())
{
warning(loc, "for D2 use 'synchronized' instead of 'volatile'");
warning(loc, "'volatile' is deprecated in D2, consult with module maintainer for appropriate replacement");
}
s = new VolatileStatement(loc, s);
break;
Expand Down

0 comments on commit 69992ee

Please sign in to comment.