]> git.saurik.com Git - bison.git/blobdiff - src/conflicts.c
(conflicts_print): If the user specifies "%expect N", report an error
[bison.git] / src / conflicts.c
index fcfa735d18ea0a24150d6a5770ff3c022b69334d..0c2fb03c38c1bd539bd2df8cd37ad77f635c6d86 100644 (file)
@@ -534,11 +534,16 @@ conflicts_print (void)
   else
     warn ("%s", conflict_report (src_total, rrc_total));
 
-  if (expected_conflicts != -1 && !src_ok)
-    complain (ngettext ("expected %d shift/reduce conflict",
-                       "expected %d shift/reduce conflicts",
-                       expected_conflicts),
-             expected_conflicts);
+  if (expected_conflicts != -1)
+    {
+      if (! src_ok)
+       complain (ngettext ("expected %d shift/reduce conflict",
+                           "expected %d shift/reduce conflicts",
+                           expected_conflicts),
+                 expected_conflicts);
+      if (rrc_total)
+       complain (_("expected 0 reduce/reduce conflicts"));
+    }
 }