mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
diagnostics: prefer ^~~~ to ^^^^ to underline code
That's what both GCC and Clang do, and it is indeed much nicer to
read. From:
foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
%error-verbose
^^^^^^^^^^^^^^
foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
%name-prefix = "foo"
^^^^^^^^^^^^^^^^^^^^
to:
foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
%error-verbose
^~~~~~~~~~~~~~
foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
%name-prefix = "foo"
^~~~~~~~~~~~~~~~~~~~
* src/location.c (location_caret): Use ^~~~.
Adjust tests expectations.
This commit is contained in:
@@ -246,16 +246,16 @@ f: B
|
||||
AT_BISON_CHECK([-Wprecedence -fcaret -o input.c input.y], 0, [],
|
||||
[[input.y:7.1-9: warning: useless precedence and associativity for U [-Wprecedence]
|
||||
%nonassoc U
|
||||
^^^^^^^^^
|
||||
^~~~~~~~~
|
||||
input.y:6.1-6: warning: useless precedence and associativity for V [-Wprecedence]
|
||||
%right V
|
||||
^^^^^^
|
||||
^~~~~~
|
||||
input.y:5.1-5: warning: useless precedence and associativity for W [-Wprecedence]
|
||||
%left W
|
||||
^^^^^
|
||||
^~~~~
|
||||
input.y:2.1-11: warning: useless precedence for Z [-Wprecedence]
|
||||
%precedence Z
|
||||
^^^^^^^^^^^
|
||||
^~~~~~~~~~~
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
@@ -1367,7 +1367,7 @@ b: %expect-rr 4
|
||||
AT_BISON_CHECK([-fcaret -o input.c input.y], 1, [],
|
||||
[[input.y:12.4-15: error: reduce/reduce conflicts for rule 8: 3 found, 4 expected
|
||||
b: %expect-rr 4
|
||||
^^^^^^^^^^^^
|
||||
^~~~~~~~~~~~
|
||||
]])
|
||||
AT_CLEANUP
|
||||
|
||||
@@ -1396,7 +1396,7 @@ b: %expect-rr 2
|
||||
AT_BISON_CHECK([-fcaret -o input.c input.y], 1, [],
|
||||
[[input.y:12.4-15: error: reduce/reduce conflicts for rule 8: 3 found, 2 expected
|
||||
b: %expect-rr 2
|
||||
^^^^^^^^^^^^
|
||||
^~~~~~~~~~~~
|
||||
]])
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user