@@ -891,7 +891,7 @@ static const char *zend_modifier_token_to_string(uint32_t token)
891891 return "protected(set)" ;
892892 case T_PRIVATE_SET :
893893 return "private(set)" ;
894- EMPTY_SWITCH_DEFAULT_CASE ()
894+ default : ZEND_UNREACHABLE ();
895895 }
896896}
897897
@@ -1834,7 +1834,7 @@ static bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *c
18341834 case ZEND_FETCH_CLASS_DEFAULT :
18351835 ZVAL_STR (zv , zend_resolve_class_name_ast (class_ast ));
18361836 return 1 ;
1837- EMPTY_SWITCH_DEFAULT_CASE ()
1837+ default : ZEND_UNREACHABLE ();
18381838 }
18391839}
18401840/* }}} */
@@ -2281,7 +2281,7 @@ static void zend_adjust_for_fetch_type(zend_op *opline, znode *result, uint32_t
22812281 case BP_VAR_UNSET :
22822282 opline -> opcode += 5 * factor ;
22832283 return ;
2284- EMPTY_SWITCH_DEFAULT_CASE ()
2284+ default : ZEND_UNREACHABLE ();
22852285 }
22862286}
22872287/* }}} */
@@ -2444,7 +2444,7 @@ static inline void zend_update_jump_target(uint32_t opnum_jump, uint32_t opnum_t
24442444 case ZEND_JMP_FRAMELESS :
24452445 opline -> op2 .opline_num = opnum_target ;
24462446 break ;
2447- EMPTY_SWITCH_DEFAULT_CASE ()
2447+ default : ZEND_UNREACHABLE ();
24482448 }
24492449}
24502450/* }}} */
@@ -3594,7 +3594,7 @@ static void zend_compile_assign(znode *result, zend_ast *ast, bool stmt, uint32_
35943594 result -> op_type = IS_UNUSED ;
35953595 }
35963596 return ;
3597- EMPTY_SWITCH_DEFAULT_CASE ();
3597+ default : ZEND_UNREACHABLE ();
35983598 }
35993599}
36003600/* }}} */
@@ -3750,7 +3750,7 @@ static void zend_compile_compound_assign(znode *result, zend_ast *ast) /* {{{ */
37503750 opline = zend_emit_op_data (& expr_node );
37513751 opline -> extended_value = cache_slot ;
37523752 return ;
3753- EMPTY_SWITCH_DEFAULT_CASE ()
3753+ default : ZEND_UNREACHABLE ();
37543754 }
37553755}
37563756/* }}} */
@@ -5012,7 +5012,7 @@ static zend_result zend_compile_func_sprintf(znode *result, zend_ast_list *args)
50125012 case 'd' :
50135013 zend_emit_op_tmp (& elements [placeholder_count ], ZEND_CAST , & elements [placeholder_count ], NULL )-> extended_value = IS_LONG ;
50145014 break ;
5015- EMPTY_SWITCH_DEFAULT_CASE ();
5015+ default : ZEND_UNREACHABLE ();
50165016 }
50175017
50185018 if (rope_elements == 0 ) {
@@ -5329,7 +5329,7 @@ static const char *zend_get_cstring_from_property_hook_kind(zend_property_hook_k
53295329 return "get" ;
53305330 case ZEND_PROPERTY_HOOK_SET :
53315331 return "set" ;
5332- EMPTY_SWITCH_DEFAULT_CASE ()
5332+ default : ZEND_UNREACHABLE ();
53335333 }
53345334}
53355335
@@ -5879,7 +5879,7 @@ static void zend_compile_unset(const zend_ast *ast) /* {{{ */
58795879 opline = zend_compile_static_prop (NULL , var_ast , BP_VAR_UNSET , false, false);
58805880 opline -> opcode = ZEND_UNSET_STATIC_PROP ;
58815881 return ;
5882- EMPTY_SWITCH_DEFAULT_CASE ()
5882+ default : ZEND_UNREACHABLE ();
58835883 }
58845884}
58855885/* }}} */
@@ -9465,7 +9465,7 @@ static void zend_compile_use_trait(const zend_ast *ast) /* {{{ */
94659465 case ZEND_AST_TRAIT_ALIAS :
94669466 zend_compile_trait_alias (adaptation_ast );
94679467 break ;
9468- EMPTY_SWITCH_DEFAULT_CASE ()
9468+ default : ZEND_UNREACHABLE ();
94699469 }
94709470 }
94719471}
@@ -9837,7 +9837,7 @@ static HashTable *zend_get_import_ht(uint32_t type) /* {{{ */
98379837 zend_hash_init (FC (imports_const ), 8 , NULL , str_dtor , 0 );
98389838 }
98399839 return FC (imports_const );
9840- EMPTY_SWITCH_DEFAULT_CASE ()
9840+ default : ZEND_UNREACHABLE ();
98419841 }
98429842
98439843 return NULL ;
@@ -9853,7 +9853,7 @@ static char *zend_get_use_type_str(uint32_t type) /* {{{ */
98539853 return " function" ;
98549854 case ZEND_SYMBOL_CONST :
98559855 return " const" ;
9856- EMPTY_SWITCH_DEFAULT_CASE ()
9856+ default : ZEND_UNREACHABLE ();
98579857 }
98589858
98599859 return " unknown" ;
@@ -10219,7 +10219,7 @@ static bool zend_try_ct_eval_magic_const(zval *zv, const zend_ast *ast) /* {{{ *
1021910219 ZVAL_EMPTY_STRING (zv );
1022010220 }
1022110221 break ;
10222- EMPTY_SWITCH_DEFAULT_CASE ()
10222+ default : ZEND_UNREACHABLE ();
1022310223 }
1022410224
1022510225 return 1 ;
@@ -10961,7 +10961,7 @@ static void zend_compile_assign_coalesce(znode *result, zend_ast *ast) /* {{{ */
1096110961 zend_emit_op_data (& default_node );
1096210962 assign_node = var_node_w ;
1096310963 break ;
10964- EMPTY_SWITCH_DEFAULT_CASE ();
10964+ default : ZEND_UNREACHABLE ();
1096510965 }
1096610966
1096710967 opline = zend_emit_op_tmp (NULL , ZEND_QM_ASSIGN , & assign_node , NULL );
@@ -11181,7 +11181,7 @@ static void zend_compile_isset_or_empty(znode *result, const zend_ast *ast) /* {
1118111181 opline = zend_compile_static_prop (result , var_ast , BP_VAR_IS , false, false);
1118211182 opline -> opcode = ZEND_ISSET_ISEMPTY_STATIC_PROP ;
1118311183 break ;
11184- EMPTY_SWITCH_DEFAULT_CASE ()
11184+ default : ZEND_UNREACHABLE ();
1118511185 }
1118611186
1118711187 result -> op_type = opline -> result_type = IS_TMP_VAR ;
@@ -11697,7 +11697,7 @@ static void zend_compile_const_expr_class_name(zend_ast **ast_ptr) /* {{{ */
1169711697 case ZEND_FETCH_CLASS_STATIC :
1169811698 zend_error_noreturn (E_COMPILE_ERROR ,
1169911699 "static::class cannot be used for compile-time class name resolution" );
11700- EMPTY_SWITCH_DEFAULT_CASE ()
11700+ default : ZEND_UNREACHABLE ();
1170111701 }
1170211702}
1170311703
@@ -11805,7 +11805,7 @@ static void zend_compile_const_expr_fcc(zend_ast **ast_ptr)
1180511805 case ZEND_AST_STATIC_CALL :
1180611806 args_ast = & (* ast_ptr )-> child [2 ];
1180711807 break ;
11808- EMPTY_SWITCH_DEFAULT_CASE ();
11808+ default : ZEND_UNREACHABLE ();
1180911809 }
1181011810 if ((* args_ast )-> kind != ZEND_AST_CALLABLE_CONVERT ) {
1181111811 zend_error_noreturn (E_COMPILE_ERROR , "Constant expression contains invalid operations" );
@@ -11843,7 +11843,7 @@ static void zend_compile_const_expr_fcc(zend_ast **ast_ptr)
1184311843 }
1184411844 break ;
1184511845 }
11846- EMPTY_SWITCH_DEFAULT_CASE ();
11846+ default : ZEND_UNREACHABLE ();
1184711847 }
1184811848}
1184911849
0 commit comments