mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03: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:
@@ -454,10 +454,10 @@ input.y:22.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used
|
||||
AT_BISON_CHECK([-fcaret -o input.c input.y], [[0]], [[]],
|
||||
[[input.y:22.8-14: warning: symbol SPECIAL redeclared [-Wother]
|
||||
%token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
||||
^^^^^^^
|
||||
^~~~~~~
|
||||
input.y:22.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used more than once as a literal string [-Wother]
|
||||
%token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
]])
|
||||
AT_COMPILE([input])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user