+ /* If the left side is an unsigned and the right is a constant,
+ * we may be able to change the compares to something more
+ * effective.
+ */
+ if (!LeftSigned && rconst) {
+
+ switch (Tok) {
+
+ case TOK_LT:
+ if (Expr2.IVal == 1) {
+ /* An unsigned compare to one means that the value
+ * must be zero.
+ */
+ GenFunc = g_eq;
+ Expr2.IVal = 0;
+ }
+ break;
+
+ case TOK_LE:
+ if (Expr2.IVal == 0) {
+ /* An unsigned compare to zero means that the value
+ * must be zero.
+ */
+ GenFunc = g_eq;
+ }
+ break;
+
+ case TOK_GE:
+ if (Expr2.IVal == 1) {
+ /* An unsigned compare to one means that the value
+ * must not be zero.
+ */
+ GenFunc = g_ne;
+ Expr2.IVal = 0;
+ }
+ break;
+
+ case TOK_GT:
+ if (Expr2.IVal == 0) {
+ /* An unsigned compare to zero means that the value
+ * must not be zero.
+ */
+ GenFunc = g_ne;
+ }
+ break;
+
+ default:
+ break;
+
+ }
+
+ }
+