help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: glr2.cc compile errors under Windows


From: Hans Åberg
Subject: Re: glr2.cc compile errors under Windows
Date: Sun, 21 Nov 2021 14:14:39 +0100

> On 21 Nov 2021, at 13:02, Jot Dot <jotdot@shaw.ca> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]