mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +00:00
diagnostics: %empty enables -Wempty-rule
* src/complain.h, src/complain.c (warning_is_unset): New. * src/reader.c (grammar_current_rule_empty_set): If enabled -Wempty-rule, if not disabled. * tests/actions.at (Implicitly empty rule): Check this feature. Also check that -Wno-empty-rule does disable this warning.
This commit is contained in:
@@ -101,6 +101,9 @@ typedef enum
|
||||
Wall = ~complaint & ~fatal & ~silent
|
||||
} warnings;
|
||||
|
||||
/** Whether the warnings of \a flags are all unset.
|
||||
(Never enabled, never disabled). */
|
||||
bool warning_is_unset (warnings flags);
|
||||
|
||||
/** Make a complaint, with maybe a location. */
|
||||
void complain (location const *loc, warnings flags, char const *message, ...)
|
||||
|
||||
Reference in New Issue
Block a user