X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/dab9663283437092d17af8ede75f3aff33380d53..8ffd7912e3b71fb0cc69e83225c3ad8e3452270f:/src/gram.c diff --git a/src/gram.c b/src/gram.c index 76acceec..21212792 100644 --- a/src/gram.c +++ b/src/gram.c @@ -24,6 +24,7 @@ #include #include "complain.h" +#include "getargs.h" #include "gram.h" #include "print-xml.h" #include "reader.h" @@ -310,8 +311,11 @@ grammar_rules_useless_report (const char *message) if (!rules[r].useful) { warn_at (rules[r].location, "%s: ", message); - rule_print (&rules[r], stderr); - fflush (stderr); + if (warnings_flag & warnings_other) + { + rule_print (&rules[r], stderr); + fflush (stderr); + } } }