summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-05-15 08:13:44 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-05-17 08:28:12 +0200
commit465babb635e551620f2f349496912d90c6738600 (patch)
treef2634ab3caed9f67007083a3f21d3c2b86f3ec18 /NEWS
parent6a28e6d412c0b8da5a5ee9540942366823301c6c (diff)
downloadbison-465babb635e551620f2f349496912d90c6738600.tar.gz
fix: do not emit nested comments
With input such as %token<fl> yVL_CLOCK "/*verilator sc_clock*/" we generate yVL_CLOCK = 610, /* "/*verilator sc_clock*/" */ which is invalid since the comment will actually be closed on the first "*/". Let's turn "*/" into "*\/" to avoid this. But GCC will also warn about "/*" inside a comment, so let's "escape" it too. Reported by Huang Rui. https://github.com/akimd/bison/issues/38 * data/skeletons/c-like.m4 (_b4_comment): Escape comment delimiters in comments. * tests/input.at (Torturing the Scanner): Check thes cases. * tests/m4.at: New.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS6
1 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 43d09e8d..23a935fa 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,12 @@ GNU Bison NEWS
Some tests were fixed.
+ When token aliases contain comment delimiters:
+
+ %token FOO "/* foo */"
+
+ bison used to emit "nested" comments, which is invalid C.
+
* Noteworthy changes in release 3.6.1 (2020-05-10) [stable]
** Bug fixes