aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libclut.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/libclut.h b/src/libclut.h
index 9790c84..76f4840 100644
--- a/src/libclut.h
+++ b/src/libclut.h
@@ -24,19 +24,25 @@
/* This is to avoid warnings about comparing double, which is safe in our case. { */
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wfloat-equal"
#endif
static inline int libclut_eq__(double a, double b) { return a == b; }
static inline int libclut_1__(double x) { return libclut_eq__(x, 1); }
static inline int libclut_0__(double x) { return libclut_eq__(x, 0); }
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__clang__)
# pragma GCC diagnostic pop
#endif
/* } */
+#if defined(__clang__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdocumentation"
+#endif
+
+
/**
* Apply contrast correction on the colour curves using sRGB.
@@ -1043,10 +1049,10 @@ static inline int libclut_0__(double x) { return libclut_eq__(x, 0); }
-#if __GNUC__
-#define LIBCLUT_GCC_ONLY__(x) x
+#if defined(__GNUC__) && !defined(__clang__)
+# define LIBCLUT_GCC_ONLY__(x) x
#else
-#define LIBCLUT_GCC_ONLY__(x) /* do nothing */
+# define LIBCLUT_GCC_ONLY__(x) /* do nothing */
#endif
@@ -1351,5 +1357,10 @@ void (libclut_model_cielab_to_ciexyz)(double, double, double, double*, double*,
+#if defined(__clang__)
+# pragma GCC diagnostic pop
+#endif
+
+
#endif