doc: sort the warning categories

* doc/bison.texi, src/getargs.c: here.
This commit is contained in:
Akim Demaille
2019-04-06 09:32:10 +02:00
parent e50eedf3c5
commit dff7454371
2 changed files with 22 additions and 22 deletions

View File

@@ -10349,6 +10349,23 @@ is specified.
Output warnings falling in @var{category}. @var{category} can be one
of:
@table @code
@item conflicts-sr
@itemx conflicts-rr
S/R and R/R conflicts. These warnings are enabled by default. However, if
the @code{%expect} or @code{%expect-rr} directive is specified, an
unexpected number of conflicts is an error, and an expected number of
conflicts is not reported, so @option{-W} and @option{--warning} then have
no effect on the conflict report.
@item deprecated
Deprecated constructs whose support will be removed in future versions of
Bison.
@item empty-rule
Empty rules without @code{%empty}. @xref{Empty Rules}. Disabled by
default, but enabled by uses of @code{%empty}, unless
@option{-Wno-empty-rule} was specified.
@item midrule-values
Warn about midrule values that are set but not used within any of the actions
of the parent rule.
@@ -10369,26 +10386,6 @@ These warnings are not enabled by default since they sometimes prove to
be false alarms in existing grammars employing the Yacc constructs
@code{$0} or @code{$-@var{n}} (where @var{n} is some positive integer).
@item yacc
Incompatibilities with POSIX Yacc.
@item conflicts-sr
@itemx conflicts-rr
S/R and R/R conflicts. These warnings are enabled by default. However, if
the @code{%expect} or @code{%expect-rr} directive is specified, an
unexpected number of conflicts is an error, and an expected number of
conflicts is not reported, so @option{-W} and @option{--warning} then have
no effect on the conflict report.
@item deprecated
Deprecated constructs whose support will be removed in future versions of
Bison.
@item empty-rule
Empty rules without @code{%empty}. @xref{Empty Rules}. Disabled by
default, but enabled by uses of @code{%empty}, unless
@option{-Wno-empty-rule} was specified.
@item precedence
Useless precedence and associativity directives. Disabled by default.
@@ -10450,6 +10447,9 @@ One would get the exact same parser with the following directives instead:
@end group
@end example
@item yacc
Incompatibilities with POSIX Yacc.
@item other
All warnings not categorized above. These warnings are enabled by default.

View File

@@ -335,13 +335,13 @@ Output:\n\
fputs (_("\
Warning categories include:\n\
'midrule-values' unset or unused midrule values\n\
'yacc' incompatibilities with POSIX Yacc\n\
'conflicts-sr' S/R conflicts (enabled by default)\n\
'conflicts-rr' R/R conflicts (enabled by default)\n\
'deprecated' obsolete constructs\n\
'empty-rule' empty rules without %empty\n\
'midrule-values' unset or unused midrule values\n\
'precedence' useless precedence and associativity\n\
'yacc' incompatibilities with POSIX Yacc\n\
'other' all other warnings (enabled by default)\n\
'all' all the warnings except 'yacc'\n\
'no-CATEGORY' turn off warnings in CATEGORY\n\