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.
This commit is contained in:
Laurent Rineau 2016-10-14 12:10:49 +02:00 committed by Andreas Fabri
parent 5df371c0c1
commit 78c8179ae6
1 changed files with 1 additions and 1 deletions

View File

@ -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){}