We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61eb31a commit 355571cCopy full SHA for 355571c
1 file changed
Zend/zend_portability.h
@@ -314,15 +314,14 @@ char *alloca();
314
315
#if (defined(__GNUC__) && ZEND_GCC_VERSION >= 4003) || __has_attribute(cold)
316
# define ZEND_COLD __attribute__((cold))
317
-# ifdef __OPTIMIZE__
318
-# define ZEND_OPT_SIZE __attribute__((optimize("Os")))
319
-# define ZEND_OPT_SPEED __attribute__((optimize("Ofast")))
320
-# else
321
-# define ZEND_OPT_SIZE
322
-# define ZEND_OPT_SPEED
323
-# endif
324
#else
325
# define ZEND_COLD
+#endif
+
+#if ((defined(__GNUC__) && ZEND_GCC_VERSION >= 4003) || __has_attribute(optimize)) && defined(__OPTIMIZE__)
+# define ZEND_OPT_SIZE __attribute__((optimize("Os")))
+# define ZEND_OPT_SPEED __attribute__((optimize("Ofast")))
+#else
326
# define ZEND_OPT_SIZE
327
# define ZEND_OPT_SPEED
328
#endif
0 commit comments