mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr.cc: avoid compiler warnings
381. types.at:366: testing glr.cc api.value.type={double} ...
test.cc:207:57: error: "__clang_major__" is not defined, evaluates to 0 [-Werror=undef]
207 | #if defined __APPLE__ && YY_CPLUSPLUS < 201103L && 4 <= __clang_major__
| ^~~~~~~~~~~~~~~
* data/skeletons/glr.cc: Check __clang_major__ before using it.
This commit is contained in:
@@ -267,7 +267,8 @@ b4_percent_code_get([[requires]])[
|
||||
|
||||
// On MacOS, PTRDIFF_MAX is defined as long long, which Clang's
|
||||
// -pedantic reports as being a C++11 extension.
|
||||
#if defined __APPLE__ && YY_CPLUSPLUS < 201103L && 4 <= __clang_major__
|
||||
#if defined __APPLE__ && YY_CPLUSPLUS < 201103L \
|
||||
&& defined __clang__ && 4 <= __clang_major__
|
||||
# pragma clang diagnostic ignored "-Wc++11-long-long"
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user