mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
Warn about character literals not of length one.
* NEWS (2.5): Document.
* src/scan-gram.l (INITIAL): Remove comment that we don't check
the length.
(SC_ESCAPED_CHARACTER): Warn if length is wrong.
* tests/input.at (Bad character literals): New test group.
(cherry picked from commit ac9b0e954b)
This commit is contained in:
13
NEWS
13
NEWS
@@ -133,6 +133,19 @@ Bison News
|
||||
about a missing semicolon where it did not before. Future releases of
|
||||
Bison will cease to append semicolons entirely.
|
||||
|
||||
** Character literals not of length one.
|
||||
|
||||
Previously, Bison quietly converted all character literals to length
|
||||
one. For example, without warning, Bison interpreted the operators in
|
||||
the following grammar to be the same token:
|
||||
|
||||
exp: exp '++'
|
||||
| exp '+' exp
|
||||
;
|
||||
|
||||
Bison now warns when a character literal is not of length one. In
|
||||
some future release, Bison will report an error instead.
|
||||
|
||||
* Changes in version 2.4.2 (????-??-??):
|
||||
|
||||
** %code is now a permanent feature.
|
||||
|
||||
Reference in New Issue
Block a user