pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /**/ #include "global.h"
-
RCSID("$Id: docode.c,v 1.
61
2000/01/04 00:
17
:
00
grubba Exp $");
+
RCSID("$Id: docode.c,v 1.
62
2000/01/04 00:
39
:
04
grubba Exp $");
#include "las.h" #include "program.h" #include "language.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "error.h"
pike.git/src/docode.c:943:
if (!match_types(lower->type, current_switch_type)) { yytype_error("Type mismatch in case.", current_switch_type, lower->type, 0); } else if (lex.pragmas & ID_STRICT_TYPES) { yytype_error("Type mismatch in case.", current_switch_type, lower->type, YYTE_IS_WARNING); } } }
+
if (!num_parse_error) {
tmp1=eval_low(lower); if(tmp1<1) { yyerror("Error in case label."); push_int(0); tmp1=1; } pop_n_elems(tmp1-1); current_switch_values_on_stack++; for(tmp1=current_switch_values_on_stack; tmp1 > 1; tmp1--)
pike.git/src/docode.c:973:
if(CAR(n)) { if(!is_const(CDR(n))) yyerror("Case label isn't constant."); current_switch_jumptable[current_switch_case]= current_switch_jumptable[current_switch_case-1]; current_switch_case++;
+
if (!num_parse_error) {
tmp1=eval_low(CDR(n)); if(tmp1<1) { yyerror("Error in second half of case label."); push_int(0); tmp1=1; } pop_n_elems(tmp1-1); current_switch_values_on_stack++; for(tmp1=current_switch_values_on_stack; tmp1 > 1; tmp1--) if(is_equal(sp-tmp1, sp-1)) yyerror("Duplicate case.");
-
+
}
current_switch_jumptable[current_switch_case++]=-1; } }else{ current_switch_jumptable[current_switch_case++]=-1; } }
-
+
}
return 0; } case F_DEFAULT: if(!current_switch_jumptable) { yyerror("Default outside switch."); }else if(current_switch_default!=-1){ yyerror("Duplicate switch default."); }else{