X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d80fb37a26b24d8aa7a4428389a6004c7f2e93be..43ca804096bad13b12d0933d14499c142f451af9:/src/reduce.c?ds=sidebyside diff --git a/src/reduce.c b/src/reduce.c index 1306374a..5338393c 100644 --- a/src/reduce.c +++ b/src/reduce.c @@ -1,7 +1,7 @@ /* Grammar reduction for Bison. - Copyright (C) 1988, 1989, 2000, 2001, 2002, 2003, 2005, 2006, - 2007 Free Software Foundation, Inc. + Copyright (C) 1988-1989, 2000-2003, 2005-2012 Free Software + Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -29,7 +29,6 @@ #include "system.h" #include -#include #include "complain.h" #include "files.h" @@ -382,26 +381,16 @@ reduce_output (FILE *out) static void reduce_print (void) { - fprintf (stderr, "%s: %s: ", grammar_file, _("warning")); - if (nuseless_nonterminals > 0) - fprintf (stderr, ngettext ("%d nonterminal", - "%d nonterminals", - nuseless_nonterminals), - nuseless_nonterminals); - - if (nuseless_nonterminals > 0 && nuseless_productions > 0) - fprintf (stderr, _(" and ")); - + warn (ngettext ("%d nonterminal useless in grammar", + "%d nonterminals useless in grammar", + nuseless_nonterminals), + nuseless_nonterminals); if (nuseless_productions > 0) - fprintf (stderr, ngettext ("%d rule", - "%d rules", - nuseless_productions), - nuseless_productions); - - if (nuseless_nonterminals > 0 || nuseless_productions > 0) - fprintf (stderr, _(" useless in grammar")); - fprintf (stderr, "\n"); + warn (ngettext ("%d rule useless in grammar", + "%d rules useless in grammar", + nuseless_productions), + nuseless_productions); } void