Only ignore with C++17
authorSylvestre Ledru <sylvestre@debian.org>
Mon, 6 Nov 2017 15:16:02 +0000 (16:16 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 6 Nov 2017 15:16:02 +0000 (16:16 +0100)
lib/lz4.c

index 71acfce..64a2e82 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
 
 
 /*
- * register is ignored when the code built with a C++ compiler
- * Remove the keyword when built with C++ to silent the warning
+ * register is ignored when the code built with a C++-17 compiler
+ * Remove the keyword when built with C++-17 to silent the warning
  */
-#ifdef __cplusplus
+#if defined(__cplusplus) &&  __cplusplus > 201402L
 #  define REGISTER
 #else
 #  define REGISTER register