diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-07-21 06:52:10 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-07-21 18:57:56 +0200 |
commit | 6b78e50cef3c2cd8e6f4e7938be987e8769f8eef (patch) | |
tree | e8aec38fe1992a2310d175e4c650099298027b4a | |
parent | 28769d608e16e9f1ebd8f7017bf3ee36395ccc5d (diff) | |
download | bison-6b78e50cef3c2cd8e6f4e7938be987e8769f8eef.tar.gz |
cex: make "rerun with '-Wcex'" a note instead of a warning
Currently the suggestion to rerun is a -Wother warning:
warning: 2 shift/reduce conflicts [-Wconflicts-sr]
warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother]
Instead, let's attach it as a subnote of the diagnostic (in the
current case, -Wconflicts-sr):
warning: 2 shift/reduce conflicts [-Wconflicts-sr]
note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
* src/conflicts.c (conflicts_print): Do that.
Adjust the test suite.
-rw-r--r-- | src/conflicts.c | 20 | ||||
-rw-r--r-- | tests/conflicts.at | 44 | ||||
-rw-r--r-- | tests/existing.at | 4 | ||||
-rw-r--r-- | tests/glr-regression.at | 34 | ||||
-rw-r--r-- | tests/input.at | 1 | ||||
-rw-r--r-- | tests/reduce.at | 2 | ||||
-rw-r--r-- | tests/sets.at | 2 |
7 files changed, 60 insertions, 47 deletions
diff --git a/src/conflicts.c b/src/conflicts.c index b6307358..b7280be7 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -686,7 +686,8 @@ conflicts_print (void) expected_rr_conflicts = -1; } - bool has_unexpected_conflicts = false; + // The warning flags used to emit a diagnostic, if we did. + warnings unexpected_conflicts_warning = Wnone; /* The following two blocks scream for factoring, but i18n support would make it ugly. */ { @@ -703,7 +704,8 @@ conflicts_print (void) complain (NULL, complaint, _("shift/reduce conflicts: %d found, %d expected"), total, expected); - has_unexpected_conflicts = true; + if (total) + unexpected_conflicts_warning = complaint; } } else if (total) @@ -713,7 +715,7 @@ conflicts_print (void) "%d shift/reduce conflicts", total), total); - has_unexpected_conflicts = true; + unexpected_conflicts_warning = Wconflicts_sr; } } @@ -731,7 +733,8 @@ conflicts_print (void) complain (NULL, complaint, _("reduce/reduce conflicts: %d found, %d expected"), total, expected); - has_unexpected_conflicts = true; + if (total) + unexpected_conflicts_warning = complaint; } } else if (total) @@ -741,15 +744,16 @@ conflicts_print (void) "%d reduce/reduce conflicts", total), total); - has_unexpected_conflicts = true; + unexpected_conflicts_warning = Wconflicts_rr; } } if (warning_is_enabled (Wcounterexamples)) report_counterexamples (); - else if (has_unexpected_conflicts) - complain (NULL, Wother, - _("rerun with option '-Wcounterexamples' to generate conflict counterexamples")); + else if (unexpected_conflicts_warning != Wnone) + subcomplain (NULL, unexpected_conflicts_warning, + _("rerun with option '-Wcounterexamples'" + " to generate conflict counterexamples")); } void diff --git a/tests/conflicts.at b/tests/conflicts.at index 616a0013..99d143e3 100644 --- a/tests/conflicts.at +++ b/tests/conflicts.at @@ -726,7 +726,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-Dlr.type=canonical-lr -o input.c input.y]], [[0]], [[]], [[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([[input]]) AT_PARSER_CHECK([[input]], [[1]], [[]], @@ -737,7 +737,7 @@ AT_PARSER_CHECK([[input]], [[1]], [[]], AT_BISON_CHECK([[-Dlr.type=canonical-lr -Dparse.lac=full \ -o input.c input.y]], [[0]], [[]], [[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([[input]]) AT_PARSER_CHECK([[input]], [[1]], [[]], @@ -748,7 +748,7 @@ AT_PARSER_CHECK([[input]], [[1]], [[]], AT_BISON_CHECK([[-Dlr.type=ielr -Dparse.lac=full -o input.c input.y]], [[0]], [[]], [[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([[input]]) AT_PARSER_CHECK([[input]], [[1]], [[]], @@ -773,7 +773,7 @@ exp: exp OP exp | NUM; AT_BISON_CHECK([-o input.c --report=all input.y], 0, [], [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) # Check the contents of the report. @@ -1032,7 +1032,7 @@ cond: AT_BISON_CHECK([-o input.c input.y], 0, [], [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:12.3-18: warning: rule useless in parser due to conflicts [-Wother] ]]) @@ -1137,7 +1137,7 @@ id : '0'; AT_BISON_CHECK([-o input.c --report=all input.y], 0, [], [[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:4.6-8: warning: rule useless in parser due to conflicts [-Wother] ]]) @@ -1272,7 +1272,7 @@ exp: exp OP exp | NUM; AT_BISON_CHECK([-o input.c input.y], 1, [], [[input.y: error: shift/reduce conflicts: 1 found, 0 expected -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_CLEANUP @@ -1309,7 +1309,7 @@ exp: exp OP exp | NUM; AT_BISON_CHECK([-o input.c input.y], 1, [], [[input.y: error: shift/reduce conflicts: 1 found, 2 expected -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_CLEANUP @@ -1329,7 +1329,7 @@ a: 'a'; AT_BISON_CHECK([-o input.c input.y], 1, [], [[input.y: error: reduce/reduce conflicts: 1 found, 0 expected -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_CLEANUP @@ -1530,7 +1530,7 @@ e: e '+' e AT_BISON_CHECK([-Wall -o input.c input.y], 0, [], [[input.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:1.1-5: warning: useless precedence and associativity for '+' [-Wprecedence] input.y:2.1-5: warning: useless precedence and associativity for '*' [-Wprecedence] ]]) @@ -1638,7 +1638,7 @@ reported_conflicts: AT_BISON_CHECK([[--report=all input.y]], 0, [], [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:12.5-20: warning: rule useless in parser due to conflicts [-Wother] input.y:20.5-20: warning: rule useless in parser due to conflicts [-Wother] input.y:21.4: warning: rule useless in parser due to conflicts [-Wother] @@ -1838,7 +1838,7 @@ AT_CHECK([[cat input.y >> input-keep.y]]) AT_BISON_CHECK([[input-keep.y]], 0, [], [[input-keep.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] input-keep.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -input-keep.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input-keep.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input-keep.y:22.4: warning: rule useless in parser due to conflicts [-Wother] input-keep.y:26.16: warning: rule useless in parser due to conflicts [-Wother] input-keep.y:32.5-7: warning: rule useless in parser due to conflicts [-Wother] @@ -2038,7 +2038,7 @@ exp: 'a' | 'a'; AT_BISON_CHECK([[2.y]], [[0]], [], [[2.y: warning: %expect-rr applies only to GLR parsers [-Wother] 2.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -2.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +2.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples 2.y:3.12-14: warning: rule useless in parser due to conflicts [-Wother] ]]) @@ -2075,15 +2075,14 @@ B: ; AT_BISON_CHECK([[sr-rr.y]], [[0]], [[]], [[sr-rr.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] sr-rr.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -sr-rr.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +sr-rr.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_BISON_CHECK([[-Wno-conflicts-sr sr-rr.y]], [[0]], [[]], [[sr-rr.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -sr-rr.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +sr-rr.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_BISON_CHECK([[-Wno-conflicts-rr sr-rr.y]], [[0]], [[]], [[sr-rr.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] -sr-rr.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] ]]) [ @@ -2140,19 +2139,30 @@ for gram in sr-rr sr rr; do ]AT_BISON_CHECK([[-Werror $file]])[ else { + issue_note=false if test -z "$sr_exp_i" && test "$sr_count" -ne 0; then echo "warning: $sr_count shift/reduce conflicts" + issue_note=true elif test "$sr_exp_i" -ne "$sr_count"; then echo "error: shift/reduce conflicts: $sr_count found, $sr_exp_i expected" + if test "$sr_exp_i" -ne 0; then + issue_note=true + fi fi if test -z "$rr_exp_i" && test "$rr_count" -ne 0; then echo "warning: $rr_count reduce/reduce conflicts" + issue_note=true elif test "$rr_exp_i" -ne "$rr_count"; then echo "error: reduce/reduce conflicts: $rr_count found, $rr_exp_i expected" + if test "$rr_exp_i" -ne 0; then + issue_note=true + fi + fi + if $issue_note; then + echo "note: rerun with option '-Wcounterexamples' to generate conflict counterexamples" fi } | sed -e "s/^/$file: /" > experr ]AT_BISON_CHECK([[-Wnone $file]], [[1]], [[]], [[experr]])[ - echo "$file: error: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Werror=other]" >> experr ]AT_BISON_CHECK([[-Werror $file]], [[1]], [[]], [[experr]])[ fi done diff --git a/tests/existing.at b/tests/existing.at index d1011fe5..4700f9a8 100644 --- a/tests/existing.at +++ b/tests/existing.at @@ -434,7 +434,7 @@ input.y:323.10: warning: empty rule without %empty [-Wempty-rule] ]AT_COND_CASE([[canonical LR]], [[input.y: warning: 265 shift/reduce conflicts [-Wconflicts-sr]]], [[input.y: warning: 65 shift/reduce conflicts [-Wconflicts-sr]]])[ -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:39.1-5: warning: useless associativity for FUNC_CALL, use %precedence [-Wprecedence] input.y:44.1-5: warning: useless associativity for YNUMBER, use %precedence [-Wprecedence] input.y:44.1-5: warning: useless associativity for YSTRING, use %precedence [-Wprecedence] @@ -1419,7 +1419,7 @@ input.y:591.18: warning: empty rule without %empty [-Wempty-rule] input.y: warning: 144 reduce/reduce conflicts [-Wconflicts-rr]]], [[input.y: warning: 78 shift/reduce conflicts [-Wconflicts-sr] input.y: warning: 10 reduce/reduce conflicts [-Wconflicts-rr]]])[ -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:72.1-5: warning: useless associativity for HQUA, use %precedence [-Wprecedence] input.y:53.1-6: warning: useless associativity for HASSIGN, use %precedence [-Wprecedence] input.y:54.1-5: warning: useless associativity for HORELSE, use %precedence [-Wprecedence] diff --git a/tests/glr-regression.at b/tests/glr-regression.at index fede248d..f5964756 100644 --- a/tests/glr-regression.at +++ b/tests/glr-regression.at @@ -89,7 +89,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr1.c -rall glr-regr1.y]], 0, [], [[glr-regr1.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] -glr-regr1.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr1.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr1]) AT_PARSER_CHECK([[glr-regr1 BPBPB]], 0, @@ -214,7 +214,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr2a.c -rall glr-regr2a.y]], 0, [], [[glr-regr2a.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] -glr-regr2a.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr2a.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr2a]) @@ -350,7 +350,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr3.c -rall glr-regr3.y]], 0, [], [[glr-regr3.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] glr-regr3.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr3.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr3.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr3]) @@ -447,7 +447,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr4.c -rall glr-regr4.y]], 0, [], [[glr-regr4.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr4.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr4.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr4]) @@ -505,7 +505,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr5.c -rall glr-regr5.y]], 0, [], [[glr-regr5.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr5.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr5.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr5]) @@ -555,7 +555,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr6.c -rall glr-regr6.y]], 0, [], [[glr-regr6.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr6.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr6.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr6]) @@ -646,7 +646,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr7.c -rall glr-regr7.y]], 0, [], [[glr-regr7.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr7.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr7.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr7]) @@ -737,7 +737,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr8.c -rall glr-regr8.y]], 0, [], [[glr-regr8.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr8.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr8.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr8]) @@ -819,7 +819,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr9.c -rall glr-regr9.y]], 0, [], [[glr-regr9.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr9.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr9.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr9]) @@ -877,7 +877,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr10.c -rall glr-regr10.y]], 0, [], [[glr-regr10.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr10.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr10.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr10]) @@ -937,7 +937,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr11.c -rall glr-regr11.y]], 0, [], [[glr-regr11.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr11.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr11.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr11]) @@ -1060,7 +1060,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr12.c -rall glr-regr12.y]], 0, [], [[glr-regr12.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] glr-regr12.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr12.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr12.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr12]) @@ -1392,7 +1392,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr14.c -rall glr-regr14.y]], 0, [], [[glr-regr14.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr14.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr14.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr14]) @@ -1487,7 +1487,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr15.c -rall glr-regr15.y]], 0, [], [[glr-regr15.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr15.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr15.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr15]) @@ -1549,7 +1549,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr16.c -rall glr-regr16.y]], 0, [], [[glr-regr16.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -glr-regr16.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr16.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr16]) @@ -1625,7 +1625,7 @@ AT_BISON_OPTION_POPDEFS AT_BISON_CHECK([[-o glr-regr17.c -rall glr-regr17.y]], 0, [], [[glr-regr17.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr] -glr-regr17.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +glr-regr17.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([glr-regr17]) @@ -1719,7 +1719,7 @@ d: /* nada. */; AT_BISON_CHECK([[-o input.c input.y]], 0, [], [[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]]) AT_COMPILE([input]) diff --git a/tests/input.at b/tests/input.at index f7afee2e..4da63795 100644 --- a/tests/input.at +++ b/tests/input.at @@ -2887,7 +2887,6 @@ input.y:13.1-14: note: previous definition input.y:14.16-29: warning: %define variable 'parse.error' redefined [-Wother] input.y:13.16-29: note: previous definition input.y: error: reduce/reduce conflicts: 0 found, 42 expected -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] input.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother] ]]) diff --git a/tests/reduce.at b/tests/reduce.at index e064cebc..b561100e 100644 --- a/tests/reduce.at +++ b/tests/reduce.at @@ -1300,7 +1300,7 @@ dnl INPUT dnl BISON-STDERR [AT_COND_CASE([[LALR]], [[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ]], [])], dnl TABLES diff --git a/tests/sets.at b/tests/sets.at index 35c5283d..4b06c111 100644 --- a/tests/sets.at +++ b/tests/sets.at @@ -285,7 +285,7 @@ term: 'n' AT_BISON_CHECK([[-fcaret input.y]], [], [], [[input.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] -input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother] +input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples input.y:2.14-17: warning: rule useless in parser due to conflicts [-Wother] 2 | expr: term | term | term | term | term | term | ^~~~ |