pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:2245:
{ yyerror("Case outside switch."); }else{ INT32 label = ins_label(-1); int i; for (i = 0; i < 2; i++) { node *case_val = i == 0 ? CAR(n) : CDR(n); if (case_val) {
-
int warn = 0;
-
if(!is_const(case_val)
&&
-
!(warn = (TEST_COMPAT(8, 0
)
&& is_const_80(case_val))))
+
if(!is_const(case_val))
yyerror("Case label isn't constant.");
-
if (warn) {
-
yywarning("Case label has external dependencies.");
-
}
+
if (case_val->type) { if (!pike_types_le(case_val->type, current_switch.type)) { if (!match_types(case_val->type, current_switch.type)) { yytype_error("Type mismatch in case.", current_switch.type, case_val->type, 0); } else if (c->lex.pragmas & ID_STRICT_TYPES) { yytype_error("Type mismatch in case.", current_switch.type, case_val->type, YYTE_IS_WARNING); }