From f27ef7207aec91d55d87bb13d0fdcbd1bc1edb46 Mon Sep 17 00:00:00 2001 From: "K. Noel Belcourt" Date: Tue, 4 Feb 2014 17:32:06 -0700 Subject: [PATCH] Add check that BOOST_HAS_LONG_LONG is supported on Darwin before enabling the macro. Apple helpfully supplies this macro (__DARWIN_NO_LONG_LONG) if long long type is supported. This to handle case where compiling with -pedantic causes compiler errors because it enforces ISO compliance (c++98 in this case). --- include/boost/config/compiler/gcc.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index aa628e5a..c560d6ae 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -74,8 +74,12 @@ // // gcc has "long long" +// Except on Darwin with standard compliance enabled (-pedantic) +// Apple gcc helpfully defines this macro we can query // -#define BOOST_HAS_LONG_LONG +#if !defined(__DARWIN_NO_LONG_LONG) +# define BOOST_HAS_LONG_LONG +#endif // // gcc implements the named return value optimization since version 3.1