summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2019-07-30 14:07:24 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2019-08-07 14:26:12 +0100
commita067b781e976b7550226534134c329cdb3c5c99c (patch)
tree2b6cf83a4b4388c85741ba3cf853a12e826eb535 /src/internal.h
parent7bc812000c39402504bb9e46f70512ad7f80c212 (diff)
downloadlibvirt-a067b781e976b7550226534134c329cdb3c5c99c.tar.gz
build: bump min required gcc to 4.8
The previous bump to 4.4 was done in: commit 24241c236e5e0b0b51a33ba539b40f5429a0df0e Author: Daniel P. Berrange <berrange@redhat.com> Date: Wed Jul 5 10:35:32 2017 +0100 Require use of GCC 4.4 or CLang compilers with 4.4 picked due to RHEL-6. Since we dropped RHEL-6, the next oldest distro is RHEL-7 (4.8.5), and thus we pick 4.8 as the new min. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h44
1 files changed, 13 insertions, 31 deletions
diff --git a/src/internal.h b/src/internal.h
index f718895460..adc1e3f496 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -185,54 +185,36 @@
# endif
#endif
-#if WORKING_PRAGMA_PUSH
-# define VIR_WARNINGS_NO_CAST_ALIGN \
+#define VIR_WARNINGS_NO_CAST_ALIGN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wcast-align\"")
-# define VIR_WARNINGS_NO_DEPRECATED \
+#define VIR_WARNINGS_NO_DEPRECATED \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-# if HAVE_SUGGEST_ATTRIBUTE_FORMAT
-# define VIR_WARNINGS_NO_PRINTF \
+#if HAVE_SUGGEST_ATTRIBUTE_FORMAT
+# define VIR_WARNINGS_NO_PRINTF \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=format\"")
-# else
-# define VIR_WARNINGS_NO_PRINTF \
+#else
+# define VIR_WARNINGS_NO_PRINTF \
_Pragma ("GCC diagnostic push")
-# endif
+#endif
/* Workaround bogus GCC 6.0 for logical 'or' equal expression warnings.
* (GCC bz 69602) */
-# if BROKEN_GCC_WLOGICALOP_EQUAL_EXPR
-# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \
+#if BROKEN_GCC_WLOGICALOP_EQUAL_EXPR
+# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wlogical-op\"")
-# else
-# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \
- _Pragma ("GCC diagnostic push")
-# endif
-
-# define VIR_WARNINGS_RESET \
- _Pragma ("GCC diagnostic pop")
#else
-# define VIR_WARNINGS_NO_CAST_ALIGN
-# define VIR_WARNINGS_NO_DEPRECATED
-# define VIR_WARNINGS_NO_PRINTF
-# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR
-# define VIR_WARNINGS_RESET
-#endif
-
-/* Workaround bogus GCC < 4.6 that produces false -Wlogical-op warnings for
- * strchr(). Those old GCCs don't support push/pop. */
-#if BROKEN_GCC_WLOGICALOP_STRCHR
-# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR \
- _Pragma ("GCC diagnostic ignored \"-Wlogical-op\"")
-#else
-# define VIR_WARNINGS_NO_WLOGICALOP_STRCHR
+# define VIR_WARNINGS_NO_WLOGICALOP_EQUAL_EXPR \
+ _Pragma ("GCC diagnostic push")
#endif
+#define VIR_WARNINGS_RESET \
+ _Pragma ("GCC diagnostic pop")
/*
* Use this when passing possibly-NULL strings to printf-a-likes.