bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cex: make "rerun with '-Wcex'" a note instead of a warning


From: Akim Demaille
Subject: Re: cex: make "rerun with '-Wcex'" a note instead of a warning
Date: Thu, 23 Jul 2020 06:35:02 +0200


> Le 21 juil. 2020 à 08:27, Akim Demaille <akim.demaille@gmail.com> a écrit :
> 
> commit d590c375bb4d60b1fb0cdd781dce58ac5812f04f
> Author: Akim Demaille <akim.demaille@gmail.com>
> Date:   Tue Jul 21 06:52:10 2020 +0200
> 
>    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 note of the diagnosis (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.

I'm installing this.

commit 9c8e6e05b6e84f1abf8ca15cb24801c2eaf9092e
Author: Akim Demaille <akim.demaille@gmail.com>
Date:   Thu Jul 23 06:33:30 2020 +0200

    tests: fixes
    
    Fix 6b78e50cef3c2cd8e6f4e7938be987e8769f8eef, "cex: make "rerun with
    '-Wcex'" a note instead of a warning"
    
    * tests/conflicts.at (-W versus %expect and %expect-rr): Fix
    expectations.

diff --git a/tests/conflicts.at b/tests/conflicts.at
index 99d143e3..2b6f4315 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -2145,7 +2145,7 @@ for gram in sr-rr sr rr; do
             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
+            if test "$sr_count" -ne 0; then
               issue_note=true
             fi
           fi
@@ -2154,7 +2154,7 @@ for gram in sr-rr sr rr; do
             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
+            if test "$rr_count" -ne 0; then
               issue_note=true
             fi
           fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]