From 0213ad6de45b7ca9a67d7e22a55a1b1aff51c6dd Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 8 Jun 2011 12:53:20 +0000 Subject: Improve auto-detection of "restrict" keyword Update and improve the auto-detection of the "restrict" keyword; add more test cases to detect more possible failures. Disable testing the array syntax void foo (double A[restrict]); where the "restrict" keyword is given within the square brackets; instead, one can use the pointer syntax void foo (double *restrict const A); which is tested. Add support for the gcc built-in function "builtin_expect", which tells the compiler the value that an expression is most likely to have. Re-enable the (currently commented out) definitions for attribute(hot) and attribute(cold). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4702 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/configure.in | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'lib/make/configure.in') diff --git a/lib/make/configure.in b/lib/make/configure.in index eee68c61..9d43bc83 100644 --- a/lib/make/configure.in +++ b/lib/make/configure.in @@ -874,13 +874,17 @@ CCTK_CXX_ATTRIBUTE_UNUSED CCTK_C_ATTRIBUTE_ALIGNED CCTK_CXX_ATTRIBUTE_ALIGNED -## Find out whether the C compiler supports __attribute__((cold)) -#CCTK_C_ATTRIBUTE_COLD -#CCTK_CXX_ATTRIBUTE_COLD -# -## Find out whether the C compiler supports __attribute__((hot)) -#CCTK_C_ATTRIBUTE_HOT -#CCTK_CXX_ATTRIBUTE_HOT +# Find out whether the C compiler supports __attribute__((cold)) +CCTK_C_ATTRIBUTE_COLD +CCTK_CXX_ATTRIBUTE_COLD + +# Find out whether the C compiler supports __attribute__((hot)) +CCTK_C_ATTRIBUTE_HOT +CCTK_CXX_ATTRIBUTE_HOT + +# Find out whether the C compiler supports __builtin_expect +CCTK_C_BUILTIN_EXPECT +CCTK_CXX_BUILTIN_EXPECT CCTK_FORTRAN_REAL4 CCTK_FORTRAN_REAL8 -- cgit v1.2.3