]> git.saurik.com Git - bison.git/blobdiff - src/conflicts.c
tests: add -pedantic for --enable-gcc-warnings.
[bison.git] / src / conflicts.c
index 0437670b30a30a46198a2aa423e088997fa63a6e..d8eddf0b7c2fe1e7f69c281175e000d7ee0b405b 100644 (file)
@@ -594,8 +594,17 @@ conflicts_print (void)
     return;
 
   /* Report the total number of conflicts on STDERR.  */
+  if (expected_sr_conflicts == -1 && expected_rr_conflicts == -1)
+    {
+      if (!(warnings_flag & warnings_conflicts_sr))
+        src_total = 0;
+      if (!(warnings_flag & warnings_conflicts_rr))
+        rrc_total = 0;
+    }
   if (src_total | rrc_total)
     {
+      if (expected_sr_conflicts == -1 && expected_rr_conflicts == -1)
+        set_warning_issued ();
       if (! yacc_flag)
        fprintf (stderr, "%s: ", current_file);
       conflict_report (stderr, src_total, rrc_total);