mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 17:23:02 +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:
@@ -249,13 +249,13 @@ exp:
|
||||
AT_BISON_CHECK([[-fcaret input.yy]], [0], [],
|
||||
[[input.yy:16.33-34: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "twice" exp { $$ = $2 + $2; }
|
||||
^^
|
||||
^~
|
||||
input.yy:17.33-36: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "thrice" exp[val] { $$ = $2 + $val + $2; }
|
||||
^^^^
|
||||
^~~~
|
||||
input.yy:17.40-41: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "thrice" exp[val] { $$ = $2 + $val + $2; }
|
||||
^^
|
||||
^~
|
||||
]])
|
||||
|
||||
AT_BISON_OPTION_POPDEFS
|
||||
|
||||
Reference in New Issue
Block a user