Skip to content

PHP 8.6 failed to build #615

@andypost

Description

@andypost

After php/php-src@04f06e8 APCu fails to build

As it supports 7.2+ I bet it safe to replace EMPTY_SWITCH_DEFAULT_CASE with default: ZEND_UNREACHABLE() directly

ref php/php-src#20063

log

/tmp/pear/temp/apcu/apc_persist.c: In function 'apc_persist_calc_zval':
/tmp/pear/temp/apcu/apc_persist.c:247:17: error: implicit declaration of function 'EMPTY_SWITCH_DEFAULT_CASE' [-Wimplicit-function-declaration]
  247 |                 EMPTY_SWITCH_DEFAULT_CASE()
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/apcu/apc_persist.c:247:44: error: expected ';' before '}' token
  247 |                 EMPTY_SWITCH_DEFAULT_CASE()
      |                                            ^
      |                                            ;
  248 |         }
      |         ~
/tmp/pear/temp/apcu/apc_persist.c: In function 'apc_persist_copy_zval_impl':
/tmp/pear/temp/apcu/apc_persist.c:453:44: error: expected ';' before '}' token
  453 |                 EMPTY_SWITCH_DEFAULT_CASE()
      |                                            ^
      |                                            ;
  454 |         }
      |         ~
/tmp/pear/temp/apcu/apc_persist.c: In function 'apc_persist_calc_zval':
/tmp/pear/temp/apcu/apc_persist.c:249:1: warning: control reaches end of non-void function [-Wreturn-type]
  249 | }
      | ^
make: *** [Makefile:245: apc_persist.lo] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions