&& right->ex_class == Value
&& right->VL_CLASS == Const
) {
- if (right->VL_VALUE < 0) {
+ if (!right->ex_type->tp_unsigned && right->VL_VALUE < 0) {
warning("unsigned compared to negative constant");
}
if (right->VL_VALUE == 0) {
#include "expr.h"
#include "type.h"
#include "noRoption.h"
+#include "lint.h"
extern char options[];
sh->sh_lowerbd = sh->sh_upperbd = (arith)0; /* immaterial ??? */
sh->sh_entries = (struct case_entry *) 0; /* case-entry list */
sh->sh_expr = *expp;
+#ifdef LINT
+ code_expr(sh->sh_expr, RVAL, TRUE, NO_LABEL, NO_LABEL);
+#endif
sh->next = switch_stack; /* push onto switch-stack */
switch_stack = sh;
C_bra(l_table); /* goto start of switch_table */
C_bra(sh->sh_break); /* skip the switch table now */
C_df_ilb(sh->sh_table); /* switch table entry */
/* evaluate the switch expr. */
+#ifndef LINT
code_expr(sh->sh_expr, RVAL, TRUE, NO_LABEL, NO_LABEL);
+#endif
tablabel = data_label(); /* the rom must have a label */
C_df_dlb(tablabel);
C_rom_ilb(sh->sh_default);