X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ef1b427325c10362bd5880c22de310ed96dbc235..bcbbf654863dd285b176a0f54a75a28c4bdac1d3:/src/conflicts.c diff --git a/src/conflicts.c b/src/conflicts.c index 7a9f3c22..9af53a67 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -1,7 +1,7 @@ /* Find and resolve or report lookahead conflicts for bison, - Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007 Free Software Foundation, Inc. + Copyright (C) 1984, 1989, 1992, 2000-2007, 2009-2012 Free Software + Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -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);