opt expression
authorAnas Nashif <anas.nashif@intel.com>
Tue, 30 Oct 2012 19:33:07 +0000 (12:33 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Tue, 30 Oct 2012 19:33:07 +0000 (12:33 -0700)
bc/bc.y

diff --git a/bc/bc.y b/bc/bc.y
index 403e326..c538eec 100644 (file)
--- a/bc/bc.y
+++ b/bc/bc.y
@@ -203,7 +203,7 @@ statement           : Warranty
                            {
                              if ($4 & 2)
                                warn ("Comparison in first for expression");
-                             if ($4 >= 0)
+                             if (!($4 & 16))
                                generate ("p");
                              $4 = next_label++;
                              sprintf (genstr, "N%1d:", $4);
@@ -211,7 +211,7 @@ statement           : Warranty
                            }
                          opt_expression ';'
                            {
-                             if ($7 < 0) generate ("1");
+                             if ($7 & 16) generate ("1");
                              $7 = next_label++;
                              sprintf (genstr, "B%1d:J%1d:", $7, break_label);
                              generate (genstr);