summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2021-08-29 09:45:24 +0200
committerAkim Demaille <akim.demaille@gmail.com>2021-08-29 10:10:56 +0200
commita5c55bb75855e046b042316302c25eb47fc9d6f2 (patch)
tree9b757cbbd50f53cbfdac3000c1a2fe5477e5a2de
parentbc5aa8e2743e7b56818d54719bf4095a6dc09912 (diff)
downloadbison-a5c55bb75855e046b042316302c25eb47fc9d6f2.tar.gz
c++: beware of Visual C++ limitations
Contrary to what commit d8cc6b073e2802d871a16dc62418a7eb62ed2216 "c++: shorten the assertions that check whether tokens are correct" believed, MS Visual C++'s preprocessor limitation is not on the input line length, but on the size of the line holding the full C++ statement. Reported by Vince Huffaker <vince@vincejulie.com> <https://lists.gnu.org/r/help-bison/2021-08/msg00003.html> * data/skeletons/variant.hh (_b4_symbol_constructor_define): Hide the assertion from Visual C++.
-rw-r--r--NEWS1
-rw-r--r--data/skeletons/variant.hh2
2 files changed, 3 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 4a30d06b..b01b2ea3 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?]
+ Portability issues in the test suite and in C++ skeletons.
* Noteworthy changes in release 3.7.90 (2021-08-13) [beta]
diff --git a/data/skeletons/variant.hh b/data/skeletons/variant.hh
index efc67a7d..e7177d9f 100644
--- a/data/skeletons/variant.hh
+++ b/data/skeletons/variant.hh
@@ -484,7 +484,9 @@ m4_define([_b4_symbol_constructor_define],
b4_locations_if([l]))[)
#endif
{]b4_parse_assert_if([[
+#if !defined _MSC_VER || defined __clang__
]b4_assert[ (]b4_tok_in($@)[);
+#endif
]])[}
]])])