com php-src: fix build with older gccs: label attributes are only available with gcc 5+: Zend/zend_portability.h
| From: | Nuno Lopes | Date: | Mon, 04 Dec 2017 20:12:20 +0000 |
| Subject: | com php-src: fix build with older gccs: label attributes are only available with gcc 5+: Zend/zend_portability.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100485@lists.php.net to get a copy of this message | ||
Commit: f55083906fe977e1740ed8f55634782f571deeff
Author: Nuno Lopes <nlopess@php.net> Mon, 4 Dec 2017 15:12:20 -0500
Parents: 525ab4198ee2b25fe309cf5dc2180f64ea14ae57
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f55083906fe977e1740ed8f55634782f571deeff
Log:
fix build with older gccs: label attributes are only available with gcc 5+
Changed paths:
M Zend/zend_portability.h
Diff:
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 2003734..0573550 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__)