Merge branch 'PHP-8.1'

* PHP-8.1:
  Suppress unused label warnings in SWITCH VM
This commit is contained in:
Nikita Popov 2021-11-04 14:52:53 +01:00
commit cacafd36a7
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ char *alloca();
#endif #endif
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 5000 #if defined(__GNUC__) && ZEND_GCC_VERSION >= 5000
# define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((cold, unused)); # define ZEND_ATTRIBUTE_UNUSED_LABEL __attribute__((unused));
# define ZEND_ATTRIBUTE_COLD_LABEL __attribute__((cold)); # define ZEND_ATTRIBUTE_COLD_LABEL __attribute__((cold));
# define ZEND_ATTRIBUTE_HOT_LABEL __attribute__((hot)); # define ZEND_ATTRIBUTE_HOT_LABEL __attribute__((hot));
#else #else

View file

@ -1088,7 +1088,7 @@ function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno,
} }
if ($use) { if ($use) {
// This handler is used by other handlers. We will add label to call it. // This handler is used by other handlers. We will add label to call it.
out($f," {$spec_name}_LABEL:\n"); out($f," {$spec_name}_LABEL: ZEND_ATTRIBUTE_UNUSED_LABEL\n");
} else { } else {
out($f,"\n"); out($f,"\n");
} }