summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2009-11-11 22:25:55 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2009-11-11 22:25:55 +0000
commitb1d5e1f49bfff9022223caa9169c0ee6ad0f5071 (patch)
tree6d0edfc955b1cccc41fb4e6e855c11917d61823e
parentdcd9452296d93c173312752ba73880d9122f6077 (diff)
Detect whether the compiler supports the attributes
const pure unused cold hot These attributes can be used to annotate declarations of variables, functions, and member functions to avoid warnings or enable additional optimisations. Detect whether the _Pragma directive is recognised. _Pragma can be used instead of #pragma, but works also inside macros. Update the detection of the static, inline, and restrict qualifiers to catch certain compiler errors, and avoids using these attributes with these compilers. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4578 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r--lib/make/aclocal.m4196
-rw-r--r--lib/make/cctk_Config.h.in128
-rw-r--r--lib/make/configure.in28
-rw-r--r--lib/make/force-reconfigure4
4 files changed, 337 insertions, 19 deletions
diff --git a/lib/make/aclocal.m4 b/lib/make/aclocal.m4
index 45f03234..8366aee6 100644
--- a/lib/make/aclocal.m4
+++ b/lib/make/aclocal.m4
@@ -381,13 +381,15 @@ for ac_kw in restrict __restrict__ __restrict; do
double * $ac_kw foo;
void bar (void * $ac_kw arr[]);
struct tux { char * $ac_kw arr[3]; };
+void func (void * arr[$ac_kw]);
], [cctk_cv_c_restrict=$ac_kw; break])
done
])
case "$cctk_cv_c_restrict" in
restrict | yes) ;;
no) AC_DEFINE(CCTK_C_RESTRICT, ) ;;
- *) AC_DEFINE_UNQUOTED(CCTK_C_RESTRICT, $cctk_cv_c_restrict) ;;
+ *) AC_DEFINE_UNQUOTED(CCTK_C_RESTRICT, $cctk_cv_c_restrict)
+ AC_DEFINE(HAVE_CCTK_C_RESTRICT, 1) ;;
esac
])
@@ -408,7 +410,8 @@ AC_LANG_RESTORE
case "$cctk_cv_cxx_restrict" in
restrict | yes) ;;
no) AC_DEFINE(CCTK_CXX_RESTRICT, ) ;;
- *) AC_DEFINE_UNQUOTED(CCTK_CXX_RESTRICT, $cctk_cv_cxx_restrict) ;;
+ *) AC_DEFINE_UNQUOTED(CCTK_CXX_RESTRICT, $cctk_cv_cxx_restrict)
+ AC_DEFINE(HAVE_CCTK_CXX_RESTRICT, 1) ;;
esac
])
@@ -427,8 +430,8 @@ AC_DEFUN(CCTK_CHECK_C_INLINE,
[AC_CACHE_CHECK([for C inline], cctk_cv_c_inline,
[cctk_cv_c_inline=no
for ac_kw in inline __inline__ __inline '__inline__ __attribute__((__gnu_inline__))'; do
-dnl AC_TRY_COMPILE(, [} $ac_kw foo() {], [cctk_cv_c_inline=$ac_kw; break])
- CCTK_TRY_LINK_2(, [foo();], [} $ac_kw foo() {], [cctk_cv_c_inline=$ac_kw; break])
+dnl AC_TRY_COMPILE(, [} $ac_kw int foo() {], [cctk_cv_c_inline=$ac_kw; break])
+ CCTK_TRY_LINK_2(, [foo();], [;} $ac_kw foo() {], [cctk_cv_c_inline=$ac_kw; break])
done
])
case "$cctk_cv_c_inline" in
@@ -439,13 +442,31 @@ case "$cctk_cv_c_inline" in
esac
])
+dnl Define the macro STATIC_INLINE to the keywords that the compiler needs
+dnl to obtain what is obtained by "static inline" in the C99 standard. If
+dnl the compiler does not support the "inline" keyword, define the macro
+dnl to "static".
+AC_DEFUN(CCTK_CHECK_C_STATIC_INLINE,
+[AC_CACHE_CHECK([for C static inline], cctk_cv_c_static_inline,
+[cctk_cv_c_static_inline=no
+for ac_kw in 'static inline' 'static __inline__' 'static __inline' 'static __inline__ __attribute__((__gnu_inline__))'; do
+dnl AC_TRY_COMPILE(, [} $ac_kw int foo() {], [cctk_cv_c_inline=$ac_kw; break])
+ CCTK_TRY_LINK_2(, [;} $ac_kw ifoo(){} foo(){ifoo();], [;} $ac_kw ifoo(){} foo2(){ifoo();], [cctk_cv_c_static_inline=$ac_kw; break])
+done
+])
+case "$cctk_cv_c_static_inline" in
+ no) AC_DEFINE(CCTK_C_STATIC_INLINE, static) ;;
+ *) AC_DEFINE_UNQUOTED(CCTK_C_STATIC_INLINE, $cctk_cv_c_static_inline) ;;
+esac
+])
+
AC_DEFUN(CCTK_C_BOOL,
[AC_CACHE_CHECK([for C bool], cctk_cv_have_c_bool,
[cctk_cv_have_c_bool=no
AC_TRY_COMPILE(, bool foo;, cctk_cv_have_c_bool=yes, cctk_cv_have_c_bool=no)
])
if test "$cctk_cv_have_c_bool" = "yes" ; then
- AC_DEFINE(HAVE_CCTK_C_BOOL)
+ AC_DEFINE(HAVE_CCTK_C_BOOL, 1)
fi
])
@@ -458,7 +479,19 @@ AC_TRY_COMPILE(, bool foo;, cctk_cv_have_cxx_bool=yes, cctk_cv_have_cxx_bool=no)
AC_LANG_RESTORE
])
if test "$cctk_cv_have_cxx_bool" = "yes" ; then
- AC_DEFINE(HAVE_CCTK_CXX_BOOL)
+ AC_DEFINE(HAVE_CCTK_CXX_BOOL, 1)
+fi
+])
+
+dnl Do nothing if the compiler accepts the _Pragma keyword.
+dnl Otherwise define _Pragma to be empty.
+AC_DEFUN(CCTK_C__PRAGMA,
+[AC_CACHE_CHECK([for C _Pragma], cctk_cv_have_c__Pragma,
+[cctk_cv_have_c__Pragma=no
+AC_TRY_COMPILE(, int x; _Pragma ("omp barrier") x=0;, cctk_cv_have_c__Pragma=yes, cctk_cv_have_c__Pragma=no)
+])
+if test "$cctk_cv_have_c__Pragma" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C__PRAGMA)
fi
])
@@ -571,3 +604,154 @@ if test "$cctk_cv_have_fortran_complex32" = "yes" ; then
AC_DEFINE(HAVE_CCTK_FORTRAN_COMPLEX32)
fi
])
+
+
+
+AC_DEFUN(CCTK_C_ATTRIBUTE_CONST,
+[AC_CACHE_CHECK([for C function __attribute__((__const__))], cctk_cv_have_c_attribute_const,
+[cctk_cv_have_c_attribute_const=no
+AC_TRY_COMPILE(, double foo (double) __attribute__((__const__));, cctk_cv_have_c_attribute_const=yes, cctk_cv_have_c_attribute_const=no)
+])
+if test "$cctk_cv_have_c_attribute_const" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C_ATTRIBUTE_CONST)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_ATTRIBUTE_CONST,
+[AC_CACHE_CHECK([for CXX function __attribute__((__const__))], cctk_cv_have_cxx_attribute_const,
+[cctk_cv_have_cxx_attribute_const=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, double foo (double) __attribute__((__const__));, cctk_cv_have_cxx_attribute_const=yes, cctk_cv_have_cxx_attribute_const=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_attribute_const" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_ATTRIBUTE_CONST)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_MEMBER_ATTRIBUTE_CONST,
+[AC_CACHE_CHECK([for CXX member function __attribute__((__const__))], cctk_cv_have_cxx_member_attribute_const,
+[cctk_cv_have_cxx_member_attribute_const=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, struct { double foo (double) __attribute__((__const__)); };, cctk_cv_have_cxx_member_attribute_const=yes, cctk_cv_have_cxx_member_attribute_const=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_member_attribute_const" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_CONST)
+fi
+])
+
+
+
+AC_DEFUN(CCTK_C_ATTRIBUTE_PURE,
+[AC_CACHE_CHECK([for C function __attribute__((__pure__))], cctk_cv_have_c_attribute_pure,
+[cctk_cv_have_c_attribute_pure=no
+AC_TRY_COMPILE(, double foo (double) __attribute__((__pure__));, cctk_cv_have_c_attribute_pure=yes, cctk_cv_have_c_attribute_pure=no)
+])
+if test "$cctk_cv_have_c_attribute_pure" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C_ATTRIBUTE_PURE)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_ATTRIBUTE_PURE,
+[AC_CACHE_CHECK([for CXX function __attribute__((__pure__))], cctk_cv_have_cxx_attribute_pure,
+[cctk_cv_have_cxx_attribute_pure=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, double foo (double) __attribute__((__pure__));, cctk_cv_have_cxx_attribute_pure=yes, cctk_cv_have_cxx_attribute_pure=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_attribute_pure" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_ATTRIBUTE_PURE)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_MEMBER_ATTRIBUTE_PURE,
+[AC_CACHE_CHECK([for CXX member function __attribute__((__pure__))], cctk_cv_have_cxx_member_attribute_pure,
+[cctk_cv_have_cxx_member_attribute_pure=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, struct { double foo (double) __attribute__((__pure__)); };, cctk_cv_have_cxx_member_attribute_pure=yes, cctk_cv_have_cxx_member_attribute_pure=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_member_attribute_pure" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_PURE)
+fi
+])
+
+
+
+AC_DEFUN(CCTK_C_ATTRIBUTE_UNUSED,
+[AC_CACHE_CHECK([for C __attribute__((__unused__))], cctk_cv_have_c_attribute_unused,
+[cctk_cv_have_c_attribute_unused=no
+AC_TRY_COMPILE(, double * foo __attribute__((__unused__));, cctk_cv_have_c_attribute_unused=yes, cctk_cv_have_c_attribute_unused=no)
+])
+if test "$cctk_cv_have_c_attribute_unused" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C_ATTRIBUTE_UNUSED)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_ATTRIBUTE_UNUSED,
+[AC_CACHE_CHECK([for CXX __attribute__((__unused__))], cctk_cv_have_cxx_attribute_unused,
+[cctk_cv_have_cxx_attribute_unused=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, double * foo __attribute__((__unused__));, cctk_cv_have_cxx_attribute_unused=yes, cctk_cv_have_cxx_attribute_unused=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_attribute_unused" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_ATTRIBUTE_UNUSED)
+fi
+])
+
+
+
+AC_DEFUN(CCTK_C_ATTRIBUTE_COLD,
+[AC_CACHE_CHECK([for C __attribute__((__cold__))], cctk_cv_have_c_attribute_cold,
+[cctk_cv_have_c_attribute_cold=no
+AC_TRY_COMPILE(, double * foo __attribute__((__cold__));, cctk_cv_have_c_attribute_cold=yes, cctk_cv_have_c_attribute_cold=no)
+])
+if test "$cctk_cv_have_c_attribute_cold" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C_ATTRIBUTE_COLD)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_ATTRIBUTE_COLD,
+[AC_CACHE_CHECK([for CXX __attribute__((__cold__))], cctk_cv_have_cxx_attribute_cold,
+[cctk_cv_have_cxx_attribute_cold=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, double * foo __attribute__((__cold__));, cctk_cv_have_cxx_attribute_cold=yes, cctk_cv_have_cxx_attribute_cold=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_attribute_cold" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_ATTRIBUTE_COLD)
+fi
+])
+
+
+
+AC_DEFUN(CCTK_C_ATTRIBUTE_HOT,
+[AC_CACHE_CHECK([for C __attribute__((__hot__))], cctk_cv_have_c_attribute_hot,
+[cctk_cv_have_c_attribute_hot=no
+AC_TRY_COMPILE(, double * foo __attribute__((__hot__));, cctk_cv_have_c_attribute_hot=yes, cctk_cv_have_c_attribute_hot=no)
+])
+if test "$cctk_cv_have_c_attribute_hot" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_C_ATTRIBUTE_HOT)
+fi
+])
+
+AC_DEFUN(CCTK_CXX_ATTRIBUTE_HOT,
+[AC_CACHE_CHECK([for CXX __attribute__((__hot__))], cctk_cv_have_cxx_attribute_hot,
+[cctk_cv_have_cxx_attribute_hot=no
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(, double * foo __attribute__((__hot__));, cctk_cv_have_cxx_attribute_hot=yes, cctk_cv_have_cxx_attribute_hot=no)
+AC_LANG_RESTORE
+])
+if test "$cctk_cv_have_cxx_attribute_hot" = "yes" ; then
+ AC_DEFINE(HAVE_CCTK_CXX_ATTRIBUTE_HOT)
+fi
+])
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index 1b2b3951..6ec556f8 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -162,37 +162,86 @@
#ifndef __cplusplus
/* Define to empty if the 'inline' keyword does not work. */
+#undef HAVE_CCTK_C_INLINE
#undef inline
+/* Define to 'static' if the 'static inline' keyword combination does
+ not work. */
+#undef CCTK_C_STATIC_INLINE
+#define CCTK_STATIC_INLINE CCTK_C_STATIC_INLINE
+
/* Define to empty if the 'const' keyword does not work. */
#undef const
/* Define to empty if the 'restrict' keyword does not work. */
+#undef HAVE_CCTK_C_RESTRICT
#undef CCTK_C_RESTRICT
#ifdef CCTK_C_RESTRICT
-#define restrict CCTK_C_RESTRICT
+# define restrict CCTK_C_RESTRICT
#endif
/* Allow the use of CCTK_RESTRICT as a qualifier always. */
#ifdef CCTK_C_RESTRICT
-#define CCTK_RESTRICT CCTK_C_RESTRICT
+# define CCTK_RESTRICT CCTK_C_RESTRICT
#else
-#define CCTK_RESTRICT restrict
+# define CCTK_RESTRICT restrict
#endif
-/* Some C compilers (e.g. c99 ones) define bool */
+/* Some C compilers (e.g. C99 ones) define bool */
#undef HAVE_CCTK_C_BOOL
/* deprecated in beta15 */
#ifdef HAVE_CCTK_C_BOOL
-#define CCTK_HAVE_C_BOOL
+# define CCTK_HAVE_C_BOOL
#endif
+#undef HAVE_CCTK_C__PRAGMA
+
/* Since this is non-standard leave commented out for the moment */
#if 0
#ifndef HAVE_CCTK_C_BOOL
typedef enum {false, true} bool;
-#endif /* HAVE_CCTK_CXX_BOOL */
+#endif /* HAVE_CCTK_C_BOOL */
+#endif
+
+/* Whether __attribute__((const)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_CONST
+#ifdef HAVE_CCTK_C_ATTRIBUTE_CONST
+# define CCTK_ATTRIBUTE_CONST __attribute__((__const__))
+#else
+# define CCTK_ATTRIBUTE_CONST
+#endif
+
+/* Whether __attribute__((pure)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_PURE
+#ifdef HAVE_CCTK_C_ATTRIBUTE_PURE
+# define CCTK_ATTRIBUTE_PURE __attribute__((__pure__))
+#else
+# define CCTK_ATTRIBUTE_PURE
+#endif
+
+/* Whether __attribute__((unused)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_UNUSED
+#ifdef HAVE_CCTK_C_ATTRIBUTE_UNUSED
+# define CCTK_ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+# define CCTK_ATTRIBUTE_UNUSED
+#endif
+
+/* Whether __attribute__((cold)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_COLD
+#ifdef HAVE_CCTK_C_ATTRIBUTE_COLD
+# define CCTK_ATTRIBUTE_COLD __attribute__((__cold__))
+#else
+# define CCTK_ATTRIBUTE_COLD
+#endif
+
+/* Whether __attribute__((hot)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_HOT
+#ifdef HAVE_CCTK_C_ATTRIBUTE_HOT
+# define CCTK_ATTRIBUTE_HOT __attribute__((__hot__))
+#else
+# define CCTK_ATTRIBUTE_HOT
#endif
#endif /* ! defined __cplusplus */
@@ -203,32 +252,87 @@ typedef enum {false, true} bool;
/****************************************************************************/
#ifdef __cplusplus
-/* Some C++ compilers don't have bool ! */
+#define CCTK_STATIC_INLINE static inline
+
+/* Some C++ compilers don't have bool */
#undef HAVE_CCTK_CXX_BOOL
#ifndef HAVE_CCTK_CXX_BOOL
typedef enum {false, true} bool;
#else
-/* deprecated in beta15 */
-#define CCTK_HAVE_CXX_BOOL
+ /* deprecated in beta15 */
+# define CCTK_HAVE_CXX_BOOL
+#endif
+
+/* Whether __attribute__((const)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_CONST
+#ifdef HAVE_CCTK_CXX_ATTRIBUTE_CONST
+# define CCTK_ATTRIBUTE_CONST __attribute__((__const__))
+#else
+# define CCTK_ATTRIBUTE_CONST
+#endif
+#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_CONST
+#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_CONST
+# define CCTK_MEMBER_ATTRIBUTE_CONST __attribute__((__const__))
+#else
+# define CCTK_MEMBER_ATTRIBUTE_CONST
+#endif
+
+/* Whether __attribute__((pure)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_PURE
+#ifdef HAVE_CCTK_CXX_ATTRIBUTE_PURE
+# define CCTK_ATTRIBUTE_PURE __attribute__((__pure__))
+#else
+# define CCTK_ATTRIBUTE_PURE
+#endif
+#undef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_PURE
+#ifdef HAVE_CCTK_CXX_MEMBER_ATTRIBUTE_PURE
+# define CCTK_MEMBER_ATTRIBUTE_PURE __attribute__((__pure__))
+#else
+# define CCTK_MEMBER_ATTRIBUTE_PURE
+#endif
+
+/* Whether __attribute__((unused)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_UNUSED
+#ifdef HAVE_CCTK_CXX_ATTRIBUTE_UNUSED
+# define CCTK_ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+# define CCTK_ATTRIBUTE_UNUSED
+#endif
+
+/* Whether __attribute__((cold)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_COLD
+#ifdef HAVE_CCTK_CXX_ATTRIBUTE_COLD
+# define CCTK_ATTRIBUTE_COLD __attribute__((__cold__))
+#else
+# define CCTK_ATTRIBUTE_COLD
+#endif
+
+/* Whether __attribute__((hot)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_HOT
+#ifdef HAVE_CCTK_CXX_ATTRIBUTE_HOT
+# define CCTK_ATTRIBUTE_HOT __attribute__((__hot__))
+#else
+# define CCTK_ATTRIBUTE_HOT
#endif
/* Some C++ compilers recognise the restrict keyword */
+#undef HAVE_CCTK_CXX_RESTRICT
#undef CCTK_CXX_RESTRICT
/* Since this is non-standard leave commented out for the moment */
#if 0
/* Define to empty if the keyword does not work. */
#ifdef CCTK_CXX_RESTRICT
-#define restrict CCTK_CXX_RESTRICT
+# define restrict CCTK_CXX_RESTRICT
#endif
#endif
/* Allow the use of CCTK_RESTRICT as a qualifier always. */
#ifdef CCTK_CXX_RESTRICT
-#define CCTK_RESTRICT CCTK_CXX_RESTRICT
+# define CCTK_RESTRICT CCTK_CXX_RESTRICT
#else
-#define CCTK_RESTRICT restrict
+# define CCTK_RESTRICT restrict
#endif
#endif /* __cplusplus */
diff --git a/lib/make/configure.in b/lib/make/configure.in
index 9484fc89..c77d9027 100644
--- a/lib/make/configure.in
+++ b/lib/make/configure.in
@@ -752,6 +752,7 @@ fi
AC_C_CONST
#AC_C_INLINE
CCTK_CHECK_C_INLINE
+CCTK_CHECK_C_STATIC_INLINE
CCTK_CHECK_C_RESTRICT
CCTK_CHECK_CXX_RESTRICT
@@ -759,6 +760,33 @@ CCTK_CHECK_CXX_RESTRICT
CCTK_C_BOOL
CCTK_CXX_BOOL
+CCTK_C__PRAGMA
+
+# NOTE: Erik Schnetter, 2009-06-22: These lead to wrong code on
+# Ranger. Don't know whether this is a problem with the compiler or
+# with how the function annotations are used here.
+#
+## Find out whether the C compiler supports __attribute__((const))
+#CCTK_C_ATTRIBUTE_CONST
+#CCTK_CXX_ATTRIBUTE_CONST
+#CCTK_CXX_MEMBER_ATTRIBUTE_CONST
+#
+## Find out whether the C compiler supports __attribute__((pure))
+#CCTK_C_ATTRIBUTE_PURE
+#CCTK_CXX_ATTRIBUTE_PURE
+#CCTK_CXX_MEMBER_ATTRIBUTE_PURE
+#
+## Find out whether the C compiler supports __attribute__((unused))
+#CCTK_C_ATTRIBUTE_UNUSED
+#CCTK_CXX_ATTRIBUTE_UNUSED
+#
+## 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
CCTK_FORTRAN_REAL4
CCTK_FORTRAN_REAL8
CCTK_FORTRAN_REAL16
diff --git a/lib/make/force-reconfigure b/lib/make/force-reconfigure
index c7041293..dc2daa8a 100644
--- a/lib/make/force-reconfigure
+++ b/lib/make/force-reconfigure
@@ -5,7 +5,7 @@
# @desc
# Timestamp file for forcing reconfiguring configurations
# @enddesc
-# @version $Id: force-reconfigure,v 1.13 2008-04-09 04:03:23 schnetter Exp $
+# @version $Id: force-reconfigure,v 1.14 2009-11-11 22:25:55 schnetter Exp $
# @@*/
31 Mar 2004: created
@@ -20,3 +20,5 @@
19 Jul 2006: detect presence of real*16 in Fortran correctly
26 May 2007: check for <malloc.h>, mallinfo, mallopt, and M_MMAP_THRESHOLD
25 Jan 2008: check for system-dependent timing functions
+11 Nov 2009: Detect whether _Pragma is available
+11 Nov 2009: Add CCTK_ATTRIBUTE_* macros and friends