Warn about backwards FOR loops with -Wbackwards-for (-Wall)

Fixes #816
This commit is contained in:
Rangi
2021-03-31 10:00:21 -04:00
parent 3741bd4617
commit 49aac2961d
6 changed files with 29 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ extern unsigned int nbErrors;
enum WarningID {
WARNING_ASSERT, /* Assertions */
WARNING_BACKWARDS_FOR, /* `for` loop with backwards range */
WARNING_BUILTIN_ARG, /* Invalid args to builtins */
WARNING_CHARMAP_REDEF, /* Charmap entry re-definition */
WARNING_DIV, /* Division undefined behavior */