diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/c-compiler.m4 | 34 | ||||
-rw-r--r-- | config/test_quiet_include.h | 18 |
2 files changed, 0 insertions, 52 deletions
diff --git a/config/c-compiler.m4 b/config/c-compiler.m4 index 050bfa5c7d7..397e1b03797 100644 --- a/config/c-compiler.m4 +++ b/config/c-compiler.m4 @@ -17,40 +17,6 @@ fi])# PGAC_C_SIGNED -# PGAC_C_INLINE -# ------------- -# Check if the C compiler understands inline functions without being -# noisy about unused static inline functions. Some older compilers -# understand inline functions (as tested by AC_C_INLINE) but warn about -# them if they aren't used in a translation unit. -# -# This test used to just define an inline function, but some compilers -# (notably clang) got too smart and now warn about unused static -# inline functions when defined inside a .c file, but not when defined -# in an included header. Since the latter is what we want to use, test -# to see if the warning appears when the function is in a header file. -# Not pretty, but it works. -# -# Defines: inline, PG_USE_INLINE -AC_DEFUN([PGAC_C_INLINE], -[AC_C_INLINE -AC_CACHE_CHECK([for quiet inline (no complaint if unreferenced)], pgac_cv_c_inline_quietly, - [pgac_cv_c_inline_quietly=no - if test "$ac_cv_c_inline" != no; then - pgac_c_inline_save_werror=$ac_c_werror_flag - ac_c_werror_flag=yes - AC_LINK_IFELSE([AC_LANG_PROGRAM([#include "$srcdir/config/test_quiet_include.h"],[])], - [pgac_cv_c_inline_quietly=yes]) - ac_c_werror_flag=$pgac_c_inline_save_werror - fi]) -if test "$pgac_cv_c_inline_quietly" != no; then - AC_DEFINE_UNQUOTED([PG_USE_INLINE], 1, - [Define to 1 if "static inline" works without unwanted warnings from ] - [compilations where static inline functions are defined but not called.]) -fi -])# PGAC_C_INLINE - - # PGAC_C_PRINTF_ARCHETYPE # ----------------------- # Set the format archetype used by gcc to check printf type functions. We diff --git a/config/test_quiet_include.h b/config/test_quiet_include.h deleted file mode 100644 index 732b23149e9..00000000000 --- a/config/test_quiet_include.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * For the raison d'etre of this file, check the comment above the definition - * of the PGAC_C_INLINE macro in config/c-compiler.m4. - */ -static inline int -fun() -{ - return 0; -} - -/* - * "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. - */ -#if defined(__ILP32__) && defined(__IBMC__) -#error "known inlining bug" -#endif |