summaryrefslogtreecommitdiff
path: root/lib/make/configure.in
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-06-08 12:53:20 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-06-08 12:53:20 +0000
commit0213ad6de45b7ca9a67d7e22a55a1b1aff51c6dd (patch)
tree6f549813e148befeaa2d9c7b341fad10c5558f4d /lib/make/configure.in
parente1e744ad347233881aa0e67263b6a3bd98b3faf3 (diff)
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
Diffstat (limited to 'lib/make/configure.in')
-rw-r--r--lib/make/configure.in18
1 files changed, 11 insertions, 7 deletions
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