Merge branch 'PHP-8.0' into PHP-8.1

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

View File

@ -252,7 +252,7 @@ char *alloca();
#endif
#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_HOT_LABEL __attribute__((hot));
#else

View File

@ -1125,7 +1125,7 @@ function gen_handler($f, $spec, $kind, $name, $op1, $op2, $use, $code, $lineno,
}
if ($use) {
// 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 {
out($f,"\n");
}