summaryrefslogtreecommitdiff
path: root/lib/make/cctk_Config.h.in
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-09-26 00:21:00 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-09-26 00:21:00 +0000
commita1492b067055e73d5b61dfe45c3cd4200bee64a2 (patch)
treef0677049f29bd0d18f50337523989fc8a1c563ac /lib/make/cctk_Config.h.in
parent06d94fb1dae1bedc506b432ccb1157d6aaa874d8 (diff)
Introduce macros CCTK_DECLARE and CCTK_DECLARE_INIT which declare or
declare and initialise local variables. They also add the necessary magic to prevent compiler warnings about unused variables. If the compiler supports __attribute__((unused)), then use this. Otherwise, use the existing fallback of taking the variable's address. In Fortran, use the variable's kind as fallback. Use these macros in autogenerated code and in "cctk.h". git-svn-id: http://svn.cactuscode.org/flesh/trunk@4146 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/cctk_Config.h.in')
-rw-r--r--lib/make/cctk_Config.h.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in
index fc9cc4a5..bebfac60 100644
--- a/lib/make/cctk_Config.h.in
+++ b/lib/make/cctk_Config.h.in
@@ -173,6 +173,9 @@ typedef enum {false, true} bool;
#endif /* HAVE_CCTK_CXX_BOOL */
#endif
+/* Whether __attribute__((unused)) exists. */
+#undef HAVE_CCTK_C_ATTRIBUTE_UNUSED
+
#endif /* ! defined __cplusplus */
/****************************************************************************/
@@ -191,6 +194,9 @@ typedef enum {false, true} bool;
#define CCTK_HAVE_CXX_BOOL
#endif
+/* Whether __attribute__((unused)) exists. */
+#undef HAVE_CCTK_CXX_ATTRIBUTE_UNUSED
+
/* Some C++ compilers recognise the restrict keyword */
#undef CCTK_CXX_RESTRICT