Mercurial > ~dholland > hg > ag > index.cgi
diff anagram/agcore/engine.cgs @ 21:1c9dac05d040
Add lint-style FALLTHROUGH annotations to fallthrough cases.
(in the parse engine and thus the output code)
Document this, because the old output causes warnings with gcc10.
author | David A. Holland |
---|---|
date | Mon, 13 Jun 2022 00:04:38 -0400 |
parents | 13d2b8934445 |
children |
line wrap: on
line diff
--- a/anagram/agcore/engine.cgs Mon Jun 13 00:02:15 2022 -0400 +++ b/anagram/agcore/engine.cgs Mon Jun 13 00:04:38 2022 -0400 @@ -676,6 +676,7 @@ return; } } while (ag_look_ahead(PCBARG) == ag_ch); + /* FALLTHROUGH */ case ag_no_match_key: ag_fail: (PCB).rx = save_index; @@ -692,6 +693,7 @@ case ag_set_key: save_index = (PCB).rx; (PCB).token_number = (AG_TOKEN_TYPE) ag_key_parm[ag_k]; + /* FALLTHROUGH */ case ag_jmp_key: ag_k = ag_key_jmp[ag_k]; ag_ch = ag_look_ahead(PCBARG); @@ -884,6 +886,7 @@ } } while (CONVERT_CASE(*(PCB).la_ptr++) == ag_ch); } + /* FALLTHROUGH */ case ag_no_match_key: ag_fail: (PCB).la_ptr = (PCB).pointer + ag_save; @@ -900,6 +903,7 @@ case ag_set_key: ag_save = (int) ((PCB).la_ptr - (PCB).pointer); (PCB).token_number = (AG_TOKEN_TYPE) ag_key_parm[ag_k]; + /* FALLTHROUGH */ case ag_jmp_key: ag_k = ag_key_jmp[ag_k]; break; @@ -2507,6 +2511,7 @@ case ag_set_key: (PCB).save_index = (PCB).rx; (PCB).token_number = (AG_TOKEN_TYPE) ag_key_parm[(PCB).key_state]; + /* FALLTHROUGH */ case ag_jmp_key: (PCB).key_state = ag_key_jmp[(PCB).key_state]; continue;