From 3f9e2a8886b5ad2534971f4fe0a9438de857c9cc Mon Sep 17 00:00:00 2001 From: eschnett Date: Tue, 26 Feb 2013 03:07:34 +0000 Subject: Implement CCTK_Error and friends git-svn-id: http://svn.cactuscode.org/flesh/trunk@4962 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/make/cctk_Config.h.in | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'lib/make/cctk_Config.h.in') diff --git a/lib/make/cctk_Config.h.in b/lib/make/cctk_Config.h.in index 44af266c..99c7eff4 100644 --- a/lib/make/cctk_Config.h.in +++ b/lib/make/cctk_Config.h.in @@ -341,6 +341,22 @@ typedef enum {false, true} bool; # define CCTK_ATTRIBUTE_HOT #endif +/* Whether __attribute__((format(...))) exists. */ +#undef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT +#ifdef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT +# define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) __attribute__((__format__(archetype, format, firstarg))) +#else +# define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) +#endif + +/* Whether __attribute__((noreturn)) exists. */ +#undef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN +#ifdef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN +# define CCTK_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#else +# define CCTK_ATTRIBUTE_NORETURN +#endif + /* Whether __builtin_expect exists. */ #undef HAVE_CCTK_C_BUILTIN_EXPECT #ifdef HAVE_CCTK_C_BUILTIN_EXPECT @@ -349,6 +365,14 @@ typedef enum {false, true} bool; # define CCTK_BUILTIN_EXPECT(x,y) (x) #endif +/* Whether __builtin_unreachable exists. */ +#undef HAVE_CCTK_C_BUILTIN_UNREACHABLE +#ifdef HAVE_CCTK_C_BUILTIN_UNREACHABLE +# define CCTK_BUILTIN_UNREACHABLE() __builtin_unreachable() +#else +# define CCTK_BUILTIN_UNREACHABLE() ((void)0) +#endif + /* OpenMP collapse clause */ #if (defined CCTK_DISABLE_OMP_COLLAPSE || \ (defined __IBMC__ && defined _ARCH_450D) || \ @@ -526,6 +550,22 @@ typedef enum {false, true} bool; # define CCTK_ATTRIBUTE_HOT #endif +/* Whether __attribute__((format(...))) exists. */ +#undef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT +#ifdef HAVE_CCTK_CXX_ATTRIBUTE_FORMAT +# define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) __attribute__((__format__(archetype, format, firstarg))) +#else +# define CCTK_ATTRIBUTE_FORMAT(archetype, format, firstarg) +#endif + +/* Whether __attribute__((noreturn)) exists. */ +#undef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN +#ifdef HAVE_CCTK_CXX_ATTRIBUTE_NORETURN +# define CCTK_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#else +# define CCTK_ATTRIBUTE_NORETURN +#endif + /* Whether __builtin_expect exists. */ #undef HAVE_CCTK_CXX_BUILTIN_EXPECT #ifdef HAVE_CCTK_CXX_BUILTIN_EXPECT @@ -534,6 +574,14 @@ typedef enum {false, true} bool; # define CCTK_BUILTIN_EXPECT(x,y) (x) #endif +/* Whether __builtin_unreachable exists. */ +#undef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE +#ifdef HAVE_CCTK_CXX_BUILTIN_UNREACHABLE +# define CCTK_BUILTIN_UNREACHABLE() __builtin_unreachable() +#else +# define CCTK_BUILTIN_UNREACHABLE() ((void)0) +#endif + /* Some C++ compilers recognise the restrict keyword */ #undef HAVE_CCTK_CXX_RESTRICT #undef CCTK_CXX_RESTRICT -- cgit v1.2.3