From 78c8179ae6cba56ac8de70a4792a459cf562769b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Oct 2016 12:10:49 +0200 Subject: [PATCH] Fix for clang With clang, at least with older version like 3.5, `__has_attribute(fallthrough)` is true but the syntax __attribute__(fallthrough) is not recognized. --- 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 1f8324c1223..263e3065497 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -567,7 +567,7 @@ typedef const void * Nullptr_t; // Anticipate C++0x's std::nullptr_t # define CGAL_FALLTHROUGH [[gnu::fallthrough]] #elif __has_cpp_attribute(clang::fallthrough) # define CGAL_FALLTHROUGH [[clang::fallthrough]] -#elif __has_attribute(fallthrough) +#elif __has_attribute(fallthrough) && ! __clang__ # define CGAL_FALLTHROUGH __attribute__ ((fallthrough)) #else # define CGAL_FALLTHROUGH while(false){}