Skip to content

Commit

Permalink
doc: sort the warning categories
Browse files Browse the repository at this point in the history
* doc/bison.texi, src/getargs.c: here.
  • Loading branch information
akimd committed Apr 6, 2019
1 parent 489aa47 commit 4d45208
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
40 changes: 20 additions & 20 deletions doc/bison.texi
Original file line number Diff line number Diff line change
Expand Up @@ -10350,6 +10350,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.
Expand All @@ -10370,26 +10387,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.

Expand Down Expand Up @@ -10451,6 +10448,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.

Expand Down
4 changes: 2 additions & 2 deletions src/getargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,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\
Expand Down

0 comments on commit 4d45208

Please sign in to comment.