diff options
| author | Tyge Løvset <[email protected]> | 2022-11-01 21:57:10 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-11-01 21:57:10 +0100 |
| commit | a5ea027efc8b3d1e43df65dce042e945c2b48a52 (patch) | |
| tree | db6b0dcd7de7ba81fdc892f923aaa5586bbd8020 /src | |
| parent | 996de4d414603f10a493c6705a9c6aef3168aa30 (diff) | |
| download | STC-modified-a5ea027efc8b3d1e43df65dce042e945c2b48a52.tar.gz STC-modified-a5ea027efc8b3d1e43df65dce042e945c2b48a52.zip | |
Various updates.
Diffstat (limited to 'src')
| -rw-r--r-- | src/checkauto.l | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/checkauto.l b/src/checkauto.l index ba0f4101..34aa280f 100644 --- a/src/checkauto.l +++ b/src/checkauto.l @@ -72,36 +72,38 @@ if { if (state == BRACESDONE) { \} { if (state != BRACES) block_type = block[--block_lev]; } return { if (block_type == AUTO) { printf("%s:%d: error: 'return' used inside a c_auto* scope.\n" - " Use 'c_breakauto' to exit the current c_auto* scope.\n", - fname, yylineno); + //" Use 'c_breakauto' to exit the current c_auto* scope.\n" + , fname, yylineno); ++errors; } else if (block_type & AUTO) { printf("%s:%d: error: 'return' used in a loop inside a c_auto* scope.\n" - " Use 'break' to exit loops, then 'c_breakauto' to exit c_auto*.\n", - fname, yylineno); + //" Use 'break' to exit loops, then 'c_breakauto' to exit c_auto*.\n" + , fname, yylineno); ++errors; } } break { if (block_type == AUTO) { printf("%s:%d: error: 'break' used inside a c_auto* scope.\n" - " Use 'c_breakauto' to exit the current c_auto* scope.\n", - fname, yylineno); + //" Use 'c_breakauto' to exit the current c_auto* scope.\n" + , fname, yylineno); ++errors; } } continue { if (block_type == AUTO) { printf("%s:%d: warning: 'continue' used inside a c_auto* scope.\n" " It will only break out of the current c_auto* scope.\n" - " Use 'c_breakauto' instead to make it explicit.\n", - fname, yylineno); + //" Use 'c_breakauto' instead to make it explicit.\n" + , fname, yylineno); ++warnings; } } c_breakauto { if (block_type != AUTO) { + /* printf("%s:%d: warning: 'c_breakauto' used outside a c_auto* scope.\n" - " Did you mean 'continue' instead?", - fname, yylineno); + " Did you mean 'continue' instead?" + , fname, yylineno); ++warnings; + */ } } {ID} ; |
