summaryrefslogtreecommitdiff
path: root/Zend/zend_portability.h
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2017-12-04 15:12:20 -0500
committerNuno Lopes <nlopess@php.net>2017-12-04 15:12:20 -0500
commitf55083906fe977e1740ed8f55634782f571deeff (patch)
treed35032a80e87553971b026e84e4a357adc563267 /Zend/zend_portability.h
parent525ab4198ee2b25fe309cf5dc2180f64ea14ae57 (diff)
downloadphp-git-f55083906fe977e1740ed8f55634782f571deeff.tar.gz
fix build with older gccs: label attributes are only available with gcc 5+
Diffstat (limited to 'Zend/zend_portability.h')
-rw-r--r--Zend/zend_portability.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 2003734f0c..0573550719 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -219,18 +219,22 @@ char *alloca();
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 4003
# define ZEND_ATTRIBUTE_UNUSED __attribute__((unused))
-# define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((cold, unused));
-# define ZEND_ATTRIBUTE_COLD_LABEL __attribute__((cold));
-# define ZEND_ATTRIBUTE_HOT_LABEL __attribute__((hot));
# define ZEND_COLD __attribute__((cold))
# define ZEND_HOT __attribute__((hot))
#else
# define ZEND_ATTRIBUTE_UNUSED
+# define ZEND_COLD
+# define ZEND_HOT
+#endif
+
+#if defined(__GNUC__) && ZEND_GCC_VERSION >= 5000
+# define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((cold, unused));
+# define ZEND_ATTRIBUTE_COLD_LABEL __attribute__((cold));
+# define ZEND_ATTRIBUTE_HOT_LABEL __attribute__((hot));
+#else
# define ZEND_ATTRIBUTE_UNUSED_LABEL
# define ZEND_ATTRIBUTE_COLD_LABEL
# define ZEND_ATTRIBUTE_HOT_LABEL
-# define ZEND_COLD
-# define ZEND_HOT
#endif
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3004 && defined(__i386__)