Re: glr2.cc compile errors under Windows

Hans Ã…berg <[email protected]> Sun, 21 Nov 2021 14:14:39 +0100
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
> On 21 Nov 2021, at 13:02, Jot Dot <[email protected]> wrote:
> 
>>   53	#if defined __cplusplus
>>   54	# define YY_CPLUSPLUS __cplusplus
>>   55	#else
>>   56	# define YY_CPLUSPLUS 199711L
>>   57	#endif
>> 
>> Please check why your compiler does not define __cplusplus.  Compliant compilers
>> must define it properly so that we can know what version of C++17 we're in.
>> See https://en.cppreference.com/w/cpp/preprocessor/replace#Predefined_macros.
> 
> 
> It is defined. Just not what we think it should be. It is 199711L

Some compilers do this, also Apple clang uses C++98. So one must use an option -std=c++20 or something. The default on GCC 11 is C++17, and on Clang 12 it is C++14.