File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1807,6 +1807,7 @@ static int hier2(value *lval)
1807
1807
setlabel (lbl_table );
1808
1808
assert (swdefault == FALSE || swdefault == TRUE);
1809
1809
if (swdefault == FALSE) {
1810
+ error (95 ); /* switch expression must contain a "default" case */
1810
1811
/* store lbl_exit as the "none-matched" label in the switch table */
1811
1812
strcpy (labelname ,itoh (lbl_exit ));
1812
1813
} else {
Original file line number Diff line number Diff line change @@ -133,7 +133,8 @@ static char *errmsg[] = {
133
133
/*091*/ "ambiguous constant; tag override is required (symbol \"%s\")\n" ,
134
134
/*092*/ "functions may not return arrays of unknown size (symbol \"%s\")\n" ,
135
135
/*093*/ "\"__addressof\" operator is invalid in preprocessor expressions\n" ,
136
- /*094*/ "division by zero\n"
136
+ /*094*/ "division by zero\n" ,
137
+ /*095*/ "switch expression must contain a \"default\" case\n"
137
138
};
138
139
139
140
static char * fatalmsg [] = {
You can’t perform that action at this time.
0 commit comments