mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
diagnostics: don't try to quote special files
Based on a report by Todd Freed. http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00000.html See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90034 * src/location.c (caret_info): Also track the file name. (location_caret): Don't quote special files.
This commit is contained in:
@@ -161,5 +161,27 @@ input.y:18.4-17: <warning>warning:</warning> empty rule without %empty [<warning
|
||||
]])
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Special files. ##
|
||||
## -------------- ##
|
||||
|
||||
# Don't try to quote special files.
|
||||
# http://lists.gnu.org/archive/html/bug-bison/2019-04/msg00000.html
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90034
|
||||
|
||||
AT_TEST([[Special files]],
|
||||
[[%%
|
||||
exp: a b
|
||||
a: {}
|
||||
#line 1 "/dev/stdout"
|
||||
b: {}
|
||||
]],
|
||||
[[input.y:11.4-5: <warning>warning:</warning> empty rule without %empty [<warning>-Wempty-rule</warning>]
|
||||
11 | a: <warning>{}</warning>
|
||||
| <warning>^~</warning>
|
||||
/dev/stdout:1.4-5: <warning>warning:</warning> empty rule without %empty [<warning>-Wempty-rule</warning>]
|
||||
]])
|
||||
|
||||
|
||||
|
||||
m4_popdef([AT_TEST])
|
||||
|
||||
Reference in New Issue
Block a user