From 82be0ddb396f8d989e442ed62da3e1c6d83cecda Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Mon, 27 Jul 2015 15:54:57 +0100 Subject: [PATCH] Output condition name with '-Wnaked-default' in '-c' mode. --- re2c/src/codegen/prepare_dfa.cc | 4 ++-- re2c/src/conf/warn.cc | 18 ++++++++++++++---- re2c/src/conf/warn.h | 2 +- re2c/src/ir/bytecode/bytecode.cc | 4 ++-- re2c/src/ir/bytecode/bytecode.h | 2 +- re2c/src/ir/dfa/dfa.h | 2 +- re2c/src/parse/parser.ypp | 4 ++-- re2c/test/bug59_bogus_yyaccept.ci.c | 4 ++-- re2c/test/bug60_redundant_yymarker.ci.c | 2 +- re2c/test/cond_error_10.c.c | 4 ++-- re2c/test/cond_error_11.c.c | 4 ++-- re2c/test/condition_01.c.c | 4 ++-- re2c/test/condition_01a.c.c | 4 ++-- re2c/test/condition_01b.c.c | 4 ++-- re2c/test/condition_02.c.c | 4 ++-- re2c/test/condition_02.cg.c | 4 ++-- re2c/test/condition_03.cg.c | 4 ++-- re2c/test/condition_04.cg.c | 4 ++-- re2c/test/condition_11.cg.c | 4 ++-- re2c/test/condition_13.cg.c | 4 ++-- re2c/test/dot_conditions.Dc.c | 4 ++-- re2c/test/repeat-01.cgir.c | 4 ++-- re2c/test/repeat-02.cgir.c | 4 ++-- re2c/test/repeat-03.cgir.c | 12 ++++++------ re2c/test/repeat-04.cgir.c | 4 ++-- re2c/test/reuse_conds_default_0.cgir.c | 4 ++-- re2c/test/reuse_conds_default_1.cgir.c | 2 +- re2c/test/reuse_conds_setup_0.cgir.c | 4 ++-- re2c/test/reuse_conds_setup_1.cgir.c | 4 ++-- 29 files changed, 69 insertions(+), 59 deletions(-) diff --git a/re2c/src/codegen/prepare_dfa.cc b/re2c/src/codegen/prepare_dfa.cc index 4286419e..8322a6da 100644 --- a/re2c/src/codegen/prepare_dfa.cc +++ b/re2c/src/codegen/prepare_dfa.cc @@ -154,7 +154,7 @@ void DFA::findBaseState() operator delete (span); } -void DFA::prepare(OutputFile & o, uint32_t & max_fill) +void DFA::prepare(OutputFile & o, uint32_t & max_fill, const std::string & cond) { bUsedYYBitmap = false; @@ -251,7 +251,7 @@ void DFA::prepare(OutputFile & o, uint32_t & max_fill) // warn if default case is not handled if (default_state && !stray_cunits.empty () && !empty_rule) { - warn.naked_default (o.get_block_line (), stray_cunits); + warn.naked_default (o.get_block_line (), stray_cunits, cond); } // warn about not shadowed rule that matches empty string diff --git a/re2c/src/conf/warn.cc b/re2c/src/conf/warn.cc index 23714d04..54b3cce2 100644 --- a/re2c/src/conf/warn.cc +++ b/re2c/src/conf/warn.cc @@ -86,7 +86,7 @@ void Warn::match_empty_string (uint32_t line) } } -void Warn::naked_default (uint32_t line, const std::vector > & stray_cunits) +void Warn::naked_default (uint32_t line, const std::vector > & stray_cunits, const std::string & cond) { if (mask[NAKED_DEFAULT] & WARNING) { @@ -94,12 +94,22 @@ void Warn::naked_default (uint32_t line, const std::vector > & stray_cunits); + void naked_default (uint32_t line, const std::vector > & stray_cunits, const std::string & cond); }; } // namespace re2c diff --git a/re2c/src/ir/bytecode/bytecode.cc b/re2c/src/ir/bytecode/bytecode.cc index 0fda50b2..352ac0d3 100644 --- a/re2c/src/ir/bytecode/bytecode.cc +++ b/re2c/src/ir/bytecode/bytecode.cc @@ -8,7 +8,7 @@ namespace re2c { static void optimize (Ins * i); -smart_ptr genCode (RegExp *re, Output & output, uint32_t ind) +smart_ptr genCode (RegExp *re, Output & output, uint32_t ind, const std::string & cond) { CharSet cs; re->split(cs); @@ -61,7 +61,7 @@ smart_ptr genCode (RegExp *re, Output & output, uint32_t ind) skeleton.emit_data (output.data); skeleton::emit_prolog (output.source, ind, output.data.file_name.c_str ()); } - dfa->prepare (output.source, output.max_fill); + dfa->prepare (output.source, output.max_fill, cond); return dfa; } diff --git a/re2c/src/ir/bytecode/bytecode.h b/re2c/src/ir/bytecode/bytecode.h index 50757e12..9a675a8f 100644 --- a/re2c/src/ir/bytecode/bytecode.h +++ b/re2c/src/ir/bytecode/bytecode.h @@ -9,7 +9,7 @@ namespace re2c { -smart_ptr genCode (RegExp * re, Output & output, uint32_t ind); +smart_ptr genCode (RegExp * re, Output & output, uint32_t ind, const std::string & cond); } // namespace re2c diff --git a/re2c/src/ir/dfa/dfa.h b/re2c/src/ir/dfa/dfa.h index 98229f67..2cbd3703 100644 --- a/re2c/src/ir/dfa/dfa.h +++ b/re2c/src/ir/dfa/dfa.h @@ -34,7 +34,7 @@ public: void findSCCs (); void findBaseState (); - void prepare (OutputFile & o, uint32_t &); + void prepare (OutputFile & o, uint32_t &, const std::string & cond); void count_used_labels (std::set & used, label_t prolog, label_t start, bool force_start) const; void emit (Output &, uint32_t &, const RegExpMap *, const std::string &, bool, bool &); diff --git a/re2c/src/parse/parser.ypp b/re2c/src/parse/parser.ypp index e29204b8..4eb6522d 100644 --- a/re2c/src/parse/parser.ypp +++ b/re2c/src/parse/parser.ypp @@ -665,7 +665,7 @@ void parse(Scanner& i, Output & o) it->second.second = it->second.second ? mkAlt(def, it->second.second) : def; } } - dfa_map[it->first] = genCode(it->second.second, o, topIndent); + dfa_map[it->first] = genCode(it->second.second, o, topIndent, it->first); } if (parseMode != Scanner::Rules && dfa_map.find(it->first) != dfa_map.end()) { @@ -686,7 +686,7 @@ void parse(Scanner& i, Output & o) { if (parseMode != Scanner::Reuse) { - dfa_map[""] = genCode(spec, o, topIndent); + dfa_map[""] = genCode(spec, o, topIndent, ""); } if (parseMode != Scanner::Rules && dfa_map.find("") != dfa_map.end()) { diff --git a/re2c/test/bug59_bogus_yyaccept.ci.c b/re2c/test/bug59_bogus_yyaccept.ci.c index f190c4e0..d6ba3b46 100644 --- a/re2c/test/bug59_bogus_yyaccept.ci.c +++ b/re2c/test/bug59_bogus_yyaccept.ci.c @@ -1,5 +1,5 @@ -re2c: warning: line 10: naked default case (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 10: naked default case (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition c1 (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition c2 (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ { diff --git a/re2c/test/bug60_redundant_yymarker.ci.c b/re2c/test/bug60_redundant_yymarker.ci.c index 48c4638c..418671ab 100644 --- a/re2c/test/bug60_redundant_yymarker.ci.c +++ b/re2c/test/bug60_redundant_yymarker.ci.c @@ -1,4 +1,4 @@ -re2c: warning: line 9: naked default case (stray code units: [0x00-c][e-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition c2 (stray code units: [0x00-c][e-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ { diff --git a/re2c/test/cond_error_10.c.c b/re2c/test/cond_error_10.c.c index 410a7ad1..9f1b573d 100644 --- a/re2c/test/cond_error_10.c.c +++ b/re2c/test/cond_error_10.c.c @@ -1,3 +1,3 @@ -re2c: warning: line 8: naked default case (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 8: naked default case (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 8: naked default case in condition a (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 8: naked default case in condition b (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] re2c: error: line 6, column 1: setup for non existing rule 'c' found diff --git a/re2c/test/cond_error_11.c.c b/re2c/test/cond_error_11.c.c index b1065648..cfd13f21 100644 --- a/re2c/test/cond_error_11.c.c +++ b/re2c/test/cond_error_11.c.c @@ -1,3 +1,3 @@ -re2c: warning: line 9: naked default case (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 9: naked default case (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition a (stray code units: [0x00-`][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition b (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] re2c: error: line 7, column 1: setup for all rules with '*' not possible when all rules are setup explicitly diff --git a/re2c/test/condition_01.c.c b/re2c/test/condition_01.c.c index 1dacb60e..935e08d1 100644 --- a/re2c/test/condition_01.c.c +++ b/re2c/test/condition_01.c.c @@ -1,5 +1,5 @@ -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition a (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition b (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_01.c.re" diff --git a/re2c/test/condition_01a.c.c b/re2c/test/condition_01a.c.c index f8dcd54d..c45c4c77 100644 --- a/re2c/test/condition_01a.c.c +++ b/re2c/test/condition_01a.c.c @@ -1,5 +1,5 @@ -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition a (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition b (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_01a.c.re" diff --git a/re2c/test/condition_01b.c.c b/re2c/test/condition_01b.c.c index 251f2332..9d7384c4 100644 --- a/re2c/test/condition_01b.c.c +++ b/re2c/test/condition_01b.c.c @@ -1,5 +1,5 @@ -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 5: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition a (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 5: naked default case in condition b (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_01b.c.re" diff --git a/re2c/test/condition_02.c.c b/re2c/test/condition_02.c.c index c74a002a..07cf5e60 100644 --- a/re2c/test/condition_02.c.c +++ b/re2c/test/condition_02.c.c @@ -1,6 +1,6 @@ re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] -re2c: warning: line 7: naked default case (stray code units: [0x00-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 7: naked default case (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 7: naked default case in condition r1 (stray code units: [0x00-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 7: naked default case in condition r2 (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_02.c.re" diff --git a/re2c/test/condition_02.cg.c b/re2c/test/condition_02.cg.c index d0c0d0fb..f96e8f5a 100644 --- a/re2c/test/condition_02.cg.c +++ b/re2c/test/condition_02.cg.c @@ -1,6 +1,6 @@ re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] -re2c: warning: line 7: naked default case (stray code units: [0x00-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 7: naked default case (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 7: naked default case in condition r1 (stray code units: [0x00-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 7: naked default case in condition r2 (stray code units: [0x00-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_02.cg.re" diff --git a/re2c/test/condition_03.cg.c b/re2c/test/condition_03.cg.c index b304d603..ab76e9f0 100644 --- a/re2c/test/condition_03.cg.c +++ b/re2c/test/condition_03.cg.c @@ -1,6 +1,6 @@ re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_03.cg.re" diff --git a/re2c/test/condition_04.cg.c b/re2c/test/condition_04.cg.c index aed18710..c1fd98c3 100644 --- a/re2c/test/condition_04.cg.c +++ b/re2c/test/condition_04.cg.c @@ -1,5 +1,5 @@ -re2c: warning: line 8: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 8: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 8: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 8: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_04.cg.re" diff --git a/re2c/test/condition_11.cg.c b/re2c/test/condition_11.cg.c index 76d2972b..84f4e1c8 100644 --- a/re2c/test/condition_11.cg.c +++ b/re2c/test/condition_11.cg.c @@ -1,6 +1,6 @@ re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_11.cg.re" diff --git a/re2c/test/condition_13.cg.c b/re2c/test/condition_13.cg.c index 962c2caa..7eebd569 100644 --- a/re2c/test/condition_13.cg.c +++ b/re2c/test/condition_13.cg.c @@ -1,6 +1,6 @@ re2c: warning: line 3: rule matches empty string [-Wmatch-empty-string] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 9: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 9: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ #line 1 "condition_13.cg.re" diff --git a/re2c/test/dot_conditions.Dc.c b/re2c/test/dot_conditions.Dc.c index 7673e7ec..d7e41b7e 100644 --- a/re2c/test/dot_conditions.Dc.c +++ b/re2c/test/dot_conditions.Dc.c @@ -1,5 +1,5 @@ -re2c: warning: line 10: naked default case (stray code units: [0x00-`][a][b-e][f][g-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 10: naked default case (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition state1 (stray code units: [0x00-`][a][b-e][f][g-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition state2 (stray code units: [0x00-`][a][b-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ digraph re2c { diff --git a/re2c/test/repeat-01.cgir.c b/re2c/test/repeat-01.cgir.c index 3c5e8856..a24c92a4 100644 --- a/re2c/test/repeat-01.cgir.c +++ b/re2c/test/repeat-01.cgir.c @@ -1,5 +1,5 @@ -re2c: warning: line 13: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 13: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 13: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 13: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ // multiple scanners diff --git a/re2c/test/repeat-02.cgir.c b/re2c/test/repeat-02.cgir.c index a5a110c1..a37dfd08 100644 --- a/re2c/test/repeat-02.cgir.c +++ b/re2c/test/repeat-02.cgir.c @@ -1,5 +1,5 @@ -re2c: warning: line 13: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 13: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 13: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 13: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] /* Generated by re2c */ // multiple scanners diff --git a/re2c/test/repeat-03.cgir.c b/re2c/test/repeat-03.cgir.c index 3e2e4305..fd304855 100644 --- a/re2c/test/repeat-03.cgir.c +++ b/re2c/test/repeat-03.cgir.c @@ -1,9 +1,9 @@ -re2c: warning: line 14: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 14: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 18: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 18: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 28: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 28: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 14: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 14: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 18: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 18: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 28: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 28: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] /* Generated by re2c */ // multiple scanners diff --git a/re2c/test/repeat-04.cgir.c b/re2c/test/repeat-04.cgir.c index 9e9077ff..7ee373ab 100644 --- a/re2c/test/repeat-04.cgir.c +++ b/re2c/test/repeat-04.cgir.c @@ -1,3 +1,3 @@ -re2c: warning: line 14: naked default case (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] -re2c: warning: line 14: naked default case (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 14: naked default case in condition r1 (stray code units: [0x00-0][3-`][c-0xFF]), better add default rule * [-Wnaked-default] +re2c: warning: line 14: naked default case in condition r2 (stray code units: [0x00-0][3-a][c-0xFF]), better add default rule * [-Wnaked-default] re2c: error: line 20, column 1: cannot have a second 'rules:re2c' block diff --git a/re2c/test/reuse_conds_default_0.cgir.c b/re2c/test/reuse_conds_default_0.cgir.c index 36967a20..751d2fb0 100644 --- a/re2c/test/reuse_conds_default_0.cgir.c +++ b/re2c/test/reuse_conds_default_0.cgir.c @@ -1,3 +1,3 @@ -re2c: warning: line 10: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 10: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] re2c: error: line 13, column 9: code to default rule 'r1' is already defined diff --git a/re2c/test/reuse_conds_default_1.cgir.c b/re2c/test/reuse_conds_default_1.cgir.c index 0162390c..fde83043 100644 --- a/re2c/test/reuse_conds_default_1.cgir.c +++ b/re2c/test/reuse_conds_default_1.cgir.c @@ -1,2 +1,2 @@ -re2c: warning: line 17: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 17: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] re2c: error: line 11, column 9: code to default rule 'r1' is already defined diff --git a/re2c/test/reuse_conds_setup_0.cgir.c b/re2c/test/reuse_conds_setup_0.cgir.c index 6521dadf..41c8b1e7 100644 --- a/re2c/test/reuse_conds_setup_0.cgir.c +++ b/re2c/test/reuse_conds_setup_0.cgir.c @@ -1,3 +1,3 @@ -re2c: warning: line 10: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 10: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 10: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] re2c: error: line 13, column 9: code to setup rule 'r1' is already defined diff --git a/re2c/test/reuse_conds_setup_1.cgir.c b/re2c/test/reuse_conds_setup_1.cgir.c index 3df23ef7..ee31e769 100644 --- a/re2c/test/reuse_conds_setup_1.cgir.c +++ b/re2c/test/reuse_conds_setup_1.cgir.c @@ -1,3 +1,3 @@ -re2c: warning: line 17: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] -re2c: warning: line 17: naked default case (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 17: naked default case in condition r1 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] +re2c: warning: line 17: naked default case in condition r2 (stray code units: [0x0A]), better add default rule * [-Wnaked-default] re2c: error: line 11, column 9: code to setup rule 'r1' is already defined -- 2.40.0