From de6fd1c898f6eca82c2130a9dbb42d00da68d79e Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Wed, 5 Aug 2015 18:19:52 +0200 Subject: Rely on inline functions even if that causes warnings in older compilers. So far we have worked around the fact that some very old compilers do not support 'inline' functions by only using inline functions conditionally (or not at all). Since such compilers are very rare by now, we have decided to rely on inline functions from 9.6 onwards. To avoid breaking these old compilers inline is defined away when not supported. That'll cause "function x defined but not used" type of warnings, but since nobody develops on such compilers anymore that's ok. This change in policy will allow us to more easily employ inline functions. I chose to remove code previously conditional on PG_USE_INLINE as it seemed confusing to have code dependent on a define that's always defined. Blacklisting of compilers, like in c53f73879f, now has to be done differently. A platform template can define PG_FORCE_DISABLE_INLINE to force inline to be defined empty. Discussion: 20150701161447.GB30708@awork2.anarazel.de --- src/template/aix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/template') diff --git a/src/template/aix b/src/template/aix index b566ff129d..414430a22f 100644 --- a/src/template/aix +++ b/src/template/aix @@ -12,6 +12,14 @@ if test "$GCC" != yes ; then esac fi +# "IBM XL C/C++ for AIX, V12.1" miscompiles, for 32-bit, some inline +# expansions of ginCompareItemPointers() "long long" arithmetic. To +# take advantage of inlining, build a 64-bit PostgreSQL. +test "$GCC" != yes -a $(getconf HARDWARE_BITMODE) == '32'; then + echo "$as_me: WARNING: disabling inlining on 32 bit aix due to a bug in xlc" 2>&1 + CPPFLAGS="$CPPFLAGS -DPG_FORCE_DISABLE_INLINE" +fi + # Native memset() is faster, tested on: # AIX 5.1 and 5.2, XLC 6.0 (IBM's cc) # AIX 5.3 ML3, gcc 4.0.1 -- cgit v1.2.3