diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index 897f1e477fc..6f6f72a1678 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -122,7 +122,7 @@ public: #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::Around_point_circulator; friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::Around_point_circulator; friend class Trapezoidal_decomposition_2::In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index aa3087055e7..24ad3b4bf15 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -94,7 +94,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index 548070ce8be..e47760609a0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -94,7 +94,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index d7d55a86846..e74b291ab06 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -91,7 +91,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h index 05a416d1342..9486ddcc41d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -96,7 +96,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h index 5b49445fc5b..72497798323 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -93,7 +93,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index c61205c26cd..db7a89c8275 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -96,7 +96,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h index 6a7e6c0eb05..e9dc3158554 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -92,7 +92,7 @@ public: #ifdef CGAL_PM_FRIEND_CLASS #if defined(__SUNPRO_CC) || defined(__PGI) || defined(__INTEL_COMPILER) friend class Trapezoidal_decomposition_2::In_face_iterator; -#elif defined(__GNUC__) +#elif (__GNUC__ > 0) friend class Trapezoidal_decomposition_2::In_face_iterator; #else friend class In_face_iterator; diff --git a/Circular_kernel_2/benchmark/parser/benchmark_parser.cpp b/Circular_kernel_2/benchmark/parser/benchmark_parser.cpp index daab78244d1..a06431e837f 100644 --- a/Circular_kernel_2/benchmark/parser/benchmark_parser.cpp +++ b/Circular_kernel_2/benchmark/parser/benchmark_parser.cpp @@ -232,7 +232,7 @@ union yyalloc /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY -# if defined (__GNUC__) +# if (__GNUC__ > 0) # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else diff --git a/Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp b/Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp index 61d55a338b9..74d1f1c0247 100644 --- a/Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp +++ b/Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp @@ -18,7 +18,7 @@ int main() { #endif #if __has_feature(cxx_thread_local) || \ - ( defined(__GNUC__) && __cplusplus >= 201103L ) + ( __GNUC__ > 0 && __cplusplus >= 201103L ) return 0; #else return 1; diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 2fff6846f8a..c406e4df1f9 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -223,7 +223,7 @@ #define CGAL_CFG_NO_TR1_ARRAY 1 // never use TR1 #define CGAL_CFG_NO_TR1_TUPLE 1 -#if !defined(__GNUC__) || defined(__INTEL_COMPILER) +#if (__GNUC__ <= 0) || defined(__INTEL_COMPILER) #define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1 #endif #if _MSC_VER==1800 @@ -509,20 +509,20 @@ using std::max; #endif #if __has_feature(cxx_thread_local) || \ - ( defined(__GNUC__) && __cplusplus >= 201103L ) || \ + ( (__GNUC__ > 0) && __cplusplus >= 201103L ) || \ ( _MSC_VER >= 1900 ) // see also Installation/cmake/modules/config/support/CGAL_test_cpp_version.cpp #define CGAL_CAN_USE_CXX11_THREAD_LOCAL #endif #if (__has_include() && __cplusplus >= 201103L ) | \ - ( defined(__GNUC__) && __cplusplus >= 201103L ) || \ + ( (__GNUC__ > 0) && __cplusplus >= 201103L ) || \ ( _MSC_VER >= 1700 ) #define CGAL_CAN_USE_CXX11_MUTEX #endif #if (__has_include() && __cplusplus >= 201103L ) || \ - ( defined(__GNUC__) && __cplusplus >= 201103L ) || \ + ( (__GNUC__ > 0) && __cplusplus >= 201103L ) || \ ( _MSC_VER >= 1700 ) #define CGAL_CAN_USE_CXX11_ATOMIC #endif diff --git a/Installation/include/CGAL/internal/deprecation_warning.h b/Installation/include/CGAL/internal/deprecation_warning.h index f0048e25b02..0206b562974 100644 --- a/Installation/include/CGAL/internal/deprecation_warning.h +++ b/Installation/include/CGAL/internal/deprecation_warning.h @@ -75,7 +75,7 @@ CGAL_static_assertion_msg(false, CGAL_INTERNAL_DEPRECATED_MESSAGE); #elif !defined(CGAL_NO_DEPRECATION_WARNINGS) // don't trigger on NO_DEPRECATION_WARNINGS # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) -# elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) +# elif (__GNUC__ > 0) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) // warning does not expand its arguments, issue a warning and add the message. # warning "A deprecated header has been included." # pragma message (CGAL_INTERNAL_DEPRECATED_MESSAGE) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 8a8cd8a5fea..e5ffa3fcd1f 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -172,7 +172,7 @@ inline double IA_opacify(double x) // Intel has a bug where -mno-sse still defines __SSE__ and __SSE2__ // (-mno-sse2 works though), no work-around for now. # if defined __SSE2_MATH__ || (defined __INTEL_COMPILER && defined __SSE2__) -# if defined(__GNUC__) +# if (__GNUC__ > 0) // ICEs in reload/LRA with older versions. asm volatile ("" : "+gx"(x) ); # else diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_regular_triangulation_traits_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_regular_triangulation_traits_3.h index 61a9aaf0a80..a7297b25ee9 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_regular_triangulation_traits_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_regular_triangulation_traits_3.h @@ -10,7 +10,7 @@ // Author(s) : Aymeric PELLE // Mael Rouxel-Labbé -#if defined(__GNUC__) +#if (__GNUC__ > 0) # pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_traits_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_traits_3.h index c8ee3c576c6..fef5f500309 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_traits_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_triangulation_traits_3.h @@ -11,7 +11,7 @@ // Author(s) : Mariette Yvinec // Manuel Caroli -#if defined(__GNUC__) +#if (__GNUC__ > 0) # pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif