@@ -872,7 +872,7 @@ static const char *zend_modifier_token_to_string(uint32_t token)
872872 return "protected(set)" ;
873873 case T_PRIVATE_SET :
874874 return "private(set)" ;
875- EMPTY_SWITCH_DEFAULT_CASE ()
875+ default : ZEND_UNREACHABLE ();
876876 }
877877}
878878
@@ -1818,7 +1818,7 @@ static bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *c
18181818 case ZEND_FETCH_CLASS_DEFAULT :
18191819 ZVAL_STR (zv , zend_resolve_class_name_ast (class_ast ));
18201820 return 1 ;
1821- EMPTY_SWITCH_DEFAULT_CASE ()
1821+ default : ZEND_UNREACHABLE ();
18221822 }
18231823}
18241824/* }}} */
@@ -2262,7 +2262,7 @@ static void zend_adjust_for_fetch_type(zend_op *opline, znode *result, uint32_t
22622262 case BP_VAR_UNSET :
22632263 opline -> opcode += 5 * factor ;
22642264 return ;
2265- EMPTY_SWITCH_DEFAULT_CASE ()
2265+ default : ZEND_UNREACHABLE ();
22662266 }
22672267}
22682268/* }}} */
@@ -2425,7 +2425,7 @@ static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_t
24252425 case ZEND_JMP_FRAMELESS :
24262426 opline -> op2 .opline_num = opnum_target ;
24272427 break ;
2428- EMPTY_SWITCH_DEFAULT_CASE ()
2428+ default : ZEND_UNREACHABLE ();
24292429 }
24302430}
24312431/* }}} */
@@ -3539,7 +3539,7 @@ static void zend_compile_assign(znode *result, zend_ast *ast) /* {{{ */
35393539
35403540 zend_compile_list_assign (result , var_ast , & expr_node , var_ast -> attr );
35413541 return ;
3542- EMPTY_SWITCH_DEFAULT_CASE ();
3542+ default : ZEND_UNREACHABLE ();
35433543 }
35443544}
35453545/* }}} */
@@ -3683,7 +3683,7 @@ static void zend_compile_compound_assign(znode *result, zend_ast *ast) /* {{{ */
36833683 opline = zend_emit_op_data (& expr_node );
36843684 opline -> extended_value = cache_slot ;
36853685 return ;
3686- EMPTY_SWITCH_DEFAULT_CASE ()
3686+ default : ZEND_UNREACHABLE ();
36873687 }
36883688}
36893689/* }}} */
@@ -4925,7 +4925,7 @@ static zend_result zend_compile_func_sprintf(znode *result, zend_ast_list *args)
49254925 case 'd' :
49264926 zend_emit_op_tmp (& elements [placeholder_count ], ZEND_CAST , & elements [placeholder_count ], NULL )-> extended_value = IS_LONG ;
49274927 break ;
4928- EMPTY_SWITCH_DEFAULT_CASE ();
4928+ default : ZEND_UNREACHABLE ();
49294929 }
49304930
49314931 if (rope_elements == 0 ) {
@@ -5077,7 +5077,7 @@ static const char *zend_get_cstring_from_property_hook_kind(zend_property_hook_k
50775077 return "get" ;
50785078 case ZEND_PROPERTY_HOOK_SET :
50795079 return "set" ;
5080- EMPTY_SWITCH_DEFAULT_CASE ()
5080+ default : ZEND_UNREACHABLE ();
50815081 }
50825082}
50835083
@@ -5597,7 +5597,7 @@ static void zend_compile_unset(zend_ast *ast) /* {{{ */
55975597 opline = zend_compile_static_prop (NULL , var_ast , BP_VAR_UNSET , false, false);
55985598 opline -> opcode = ZEND_UNSET_STATIC_PROP ;
55995599 return ;
5600- EMPTY_SWITCH_DEFAULT_CASE ()
5600+ default : ZEND_UNREACHABLE ();
56015601 }
56025602}
56035603/* }}} */
@@ -9168,7 +9168,7 @@ static void zend_compile_use_trait(zend_ast *ast) /* {{{ */
91689168 case ZEND_AST_TRAIT_ALIAS :
91699169 zend_compile_trait_alias (adaptation_ast );
91709170 break ;
9171- EMPTY_SWITCH_DEFAULT_CASE ()
9171+ default : ZEND_UNREACHABLE ();
91729172 }
91739173 }
91749174}
@@ -9543,7 +9543,7 @@ static HashTable *zend_get_import_ht(uint32_t type) /* {{{ */
95439543 zend_hash_init (FC (imports_const ), 8 , NULL , str_dtor , 0 );
95449544 }
95459545 return FC (imports_const );
9546- EMPTY_SWITCH_DEFAULT_CASE ()
9546+ default : ZEND_UNREACHABLE ();
95479547 }
95489548
95499549 return NULL ;
@@ -9559,7 +9559,7 @@ static char *zend_get_use_type_str(uint32_t type) /* {{{ */
95599559 return " function" ;
95609560 case ZEND_SYMBOL_CONST :
95619561 return " const" ;
9562- EMPTY_SWITCH_DEFAULT_CASE ()
9562+ default : ZEND_UNREACHABLE ();
95639563 }
95649564
95659565 return " unknown" ;
@@ -9926,7 +9926,7 @@ static bool zend_try_ct_eval_magic_const(zval *zv, zend_ast *ast) /* {{{ */
99269926 ZVAL_EMPTY_STRING (zv );
99279927 }
99289928 break ;
9929- EMPTY_SWITCH_DEFAULT_CASE ()
9929+ default : ZEND_UNREACHABLE ();
99309930 }
99319931
99329932 return 1 ;
@@ -10670,7 +10670,7 @@ static void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */
1067010670 zend_emit_op_data (& default_node );
1067110671 assign_node = var_node_w ;
1067210672 break ;
10673- EMPTY_SWITCH_DEFAULT_CASE ();
10673+ default : ZEND_UNREACHABLE ();
1067410674 }
1067510675
1067610676 opline = zend_emit_op_tmp (NULL , ZEND_QM_ASSIGN , & assign_node , NULL );
@@ -10890,7 +10890,7 @@ static void zend_compile_isset_or_empty(znode *result, zend_ast *ast) /* {{{ */
1089010890 opline = zend_compile_static_prop (result , var_ast , BP_VAR_IS , false, false);
1089110891 opline -> opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP ;
1089210892 break ;
10893- EMPTY_SWITCH_DEFAULT_CASE ()
10893+ default : ZEND_UNREACHABLE ();
1089410894 }
1089510895
1089610896 result -> op_type = opline -> result_type = IS_TMP_VAR ;
@@ -11407,7 +11407,7 @@ static void zend_compile_const_expr_class_name(zend_ast **ast_ptr) /* {{{ */
1140711407 zend_error_noreturn (E_COMPILE_ERROR ,
1140811408 "static::class cannot be used for compile-time class name resolution" );
1140911409 return ;
11410- EMPTY_SWITCH_DEFAULT_CASE ()
11410+ default : ZEND_UNREACHABLE ();
1141111411 }
1141211412}
1141311413
@@ -11510,7 +11510,7 @@ static void zend_compile_const_expr_fcc(zend_ast **ast_ptr)
1151011510 case ZEND_AST_STATIC_CALL :
1151111511 args_ast = & (* ast_ptr )-> child [2 ];
1151211512 break ;
11513- EMPTY_SWITCH_DEFAULT_CASE ();
11513+ default : ZEND_UNREACHABLE ();
1151411514 }
1151511515 if ((* args_ast )-> kind != ZEND_AST_CALLABLE_CONVERT ) {
1151611516 zend_error_noreturn (E_COMPILE_ERROR , "Constant expression contains invalid operations" );
@@ -11548,7 +11548,7 @@ static void zend_compile_const_expr_fcc(zend_ast **ast_ptr)
1154811548 }
1154911549 break ;
1155011550 }
11551- EMPTY_SWITCH_DEFAULT_CASE ();
11551+ default : ZEND_UNREACHABLE ();
1155211552 }
1155311553}
1155411554
0 commit comments