From a5c55bb75855e046b042316302c25eb47fc9d6f2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 29 Aug 2021 09:45:24 +0200 Subject: [PATCH] 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 * data/skeletons/variant.hh (_b4_symbol_constructor_define): Hide the assertion from Visual C++. --- NEWS | 1 + data/skeletons/variant.hh | 2 ++ 2 files changed, 3 insertions(+) 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 ]])[} ]])])