Skip to content

Commit

Permalink
Merge pull request #2965 from rainers/issue11749
Browse files Browse the repository at this point in the history
fix  Issue 11749 - switch case fallthrough error is enabled with -w, but cannot be made informational warning
  • Loading branch information
yebblies committed Dec 15, 2013
2 parents e6ffe6e + 92d0003 commit f911119
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/statement.c
Expand Up @@ -825,7 +825,7 @@ int CompoundStatement::blockExit(bool mustNotThrow)
else
{
const char *gototype = s->isCaseStatement() ? "case" : "default";
s->error("switch case fallthrough - use 'goto %s;' if intended", gototype);
s->warning("switch case fallthrough - use 'goto %s;' if intended", gototype);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/fail_compilation/fail11653.d
Expand Up @@ -2,7 +2,7 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail11653.d(18): Error: switch case fallthrough - use 'goto case;' if intended
fail_compilation/fail11653.d(18): Warning: switch case fallthrough - use 'goto case;' if intended
---
*/

Expand Down

0 comments on commit f911119

Please sign in to comment.