From f67f2094d7bce3134b9fa41f2b46ff94d6abbda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 25 Apr 2022 22:46:10 +0200 Subject: [PATCH 1/3] update for intel compiler + c++14 is the minimal supported version --- Installation/include/CGAL/config.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 540fdb1d392..0c7db7aba12 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -487,15 +487,20 @@ namespace cpp11{ // http://clang.llvm.org/docs/AttributeReference.html#statement-attributes // See for gcc: // https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html -#if __cpp_attributes >= 200809 && __has_cpp_attribute(fallthrough) -# define CGAL_FALLTHROUGH [[fallthrough]] -#elif __cpp_attributes >= 200809 && __has_cpp_attribute(gnu::fallthrough) -# define CGAL_FALLTHROUGH [[gnu::fallthrough]] -#elif __cpp_attributes >= 200809 && __has_cpp_attribute(clang::fallthrough) -# define CGAL_FALLTHROUGH [[clang::fallthrough]] -#elif __has_attribute(fallthrough) && ! __clang__ -# define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) -#else +#if defined(__has_cpp_attribute) + #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) + # define CGAL_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + # define CGAL_FALLTHROUGH [[gnu::fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + # define CGAL_FALLTHROUGH [[clang::fallthrough]] + #endif +#elif defined(_has_attribute) + #if __has_attribute(fallthrough) && ! __clang__ + # define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) + #endif +#endif +#if !defined(CGAL_FALLTHROUGH) # define CGAL_FALLTHROUGH while(false){} #endif From 8be823691854aba9cddd922aaa14ab8540a9ee07 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 26 Apr 2022 22:30:56 +0200 Subject: [PATCH 2/3] fix typo Co-authored-by: Laurent Rineau --- Installation/include/CGAL/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 0c7db7aba12..21325557cb3 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -495,7 +495,7 @@ namespace cpp11{ #elif __has_cpp_attribute(clang::fallthrough) # define CGAL_FALLTHROUGH [[clang::fallthrough]] #endif -#elif defined(_has_attribute) +#elif defined(__has_attribute) #if __has_attribute(fallthrough) && ! __clang__ # define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) #endif From ab7aa75b679a095af7df734466c98c8db530b566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 28 Apr 2022 13:59:14 +0200 Subject: [PATCH 3/3] macros are always defined --- Installation/include/CGAL/config.h | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 21325557cb3..3ed212d796e 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -487,20 +487,15 @@ namespace cpp11{ // http://clang.llvm.org/docs/AttributeReference.html#statement-attributes // See for gcc: // https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html -#if defined(__has_cpp_attribute) - #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) - # define CGAL_FALLTHROUGH [[fallthrough]] - #elif __has_cpp_attribute(gnu::fallthrough) - # define CGAL_FALLTHROUGH [[gnu::fallthrough]] - #elif __has_cpp_attribute(clang::fallthrough) - # define CGAL_FALLTHROUGH [[clang::fallthrough]] - #endif -#elif defined(__has_attribute) - #if __has_attribute(fallthrough) && ! __clang__ - # define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) - #endif -#endif -#if !defined(CGAL_FALLTHROUGH) +#if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) +# define CGAL_FALLTHROUGH [[fallthrough]] +#elif __has_cpp_attribute(gnu::fallthrough) +# define CGAL_FALLTHROUGH [[gnu::fallthrough]] +#elif __has_cpp_attribute(clang::fallthrough) +# define CGAL_FALLTHROUGH [[clang::fallthrough]] +#elif __has_attribute(fallthrough) && ! __clang__ +# define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) +#else # define CGAL_FALLTHROUGH while(false){} #endif