Skip to content

Commit 4d45208

Browse files
committed
doc: sort the warning categories
* doc/bison.texi, src/getargs.c: here.
1 parent 489aa47 commit 4d45208

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

doc/bison.texi

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10350,6 +10350,23 @@ is specified.
1035010350
Output warnings falling in @var{category}. @var{category} can be one
1035110351
of:
1035210352
@table @code
10353+
@item conflicts-sr
10354+
@itemx conflicts-rr
10355+
S/R and R/R conflicts. These warnings are enabled by default. However, if
10356+
the @code{%expect} or @code{%expect-rr} directive is specified, an
10357+
unexpected number of conflicts is an error, and an expected number of
10358+
conflicts is not reported, so @option{-W} and @option{--warning} then have
10359+
no effect on the conflict report.
10360+
10361+
@item deprecated
10362+
Deprecated constructs whose support will be removed in future versions of
10363+
Bison.
10364+
10365+
@item empty-rule
10366+
Empty rules without @code{%empty}. @xref{Empty Rules}. Disabled by
10367+
default, but enabled by uses of @code{%empty}, unless
10368+
@option{-Wno-empty-rule} was specified.
10369+
1035310370
@item midrule-values
1035410371
Warn about midrule values that are set but not used within any of the actions
1035510372
of the parent rule.
@@ -10370,26 +10387,6 @@ These warnings are not enabled by default since they sometimes prove to
1037010387
be false alarms in existing grammars employing the Yacc constructs
1037110388
@code{$0} or @code{$-@var{n}} (where @var{n} is some positive integer).
1037210389

10373-
@item yacc
10374-
Incompatibilities with POSIX Yacc.
10375-
10376-
@item conflicts-sr
10377-
@itemx conflicts-rr
10378-
S/R and R/R conflicts. These warnings are enabled by default. However, if
10379-
the @code{%expect} or @code{%expect-rr} directive is specified, an
10380-
unexpected number of conflicts is an error, and an expected number of
10381-
conflicts is not reported, so @option{-W} and @option{--warning} then have
10382-
no effect on the conflict report.
10383-
10384-
@item deprecated
10385-
Deprecated constructs whose support will be removed in future versions of
10386-
Bison.
10387-
10388-
@item empty-rule
10389-
Empty rules without @code{%empty}. @xref{Empty Rules}. Disabled by
10390-
default, but enabled by uses of @code{%empty}, unless
10391-
@option{-Wno-empty-rule} was specified.
10392-
1039310390
@item precedence
1039410391
Useless precedence and associativity directives. Disabled by default.
1039510392

@@ -10451,6 +10448,9 @@ One would get the exact same parser with the following directives instead:
1045110448
@end group
1045210449
@end example
1045310450

10451+
@item yacc
10452+
Incompatibilities with POSIX Yacc.
10453+
1045410454
@item other
1045510455
All warnings not categorized above. These warnings are enabled by default.
1045610456

src/getargs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,13 +333,13 @@ Output:\n\
333333

334334
fputs (_("\
335335
Warning categories include:\n\
336-
'midrule-values' unset or unused midrule values\n\
337-
'yacc' incompatibilities with POSIX Yacc\n\
338336
'conflicts-sr' S/R conflicts (enabled by default)\n\
339337
'conflicts-rr' R/R conflicts (enabled by default)\n\
340338
'deprecated' obsolete constructs\n\
341339
'empty-rule' empty rules without %empty\n\
340+
'midrule-values' unset or unused midrule values\n\
342341
'precedence' useless precedence and associativity\n\
342+
'yacc' incompatibilities with POSIX Yacc\n\
343343
'other' all other warnings (enabled by default)\n\
344344
'all' all the warnings except 'yacc'\n\
345345
'no-CATEGORY' turn off warnings in CATEGORY\n\

0 commit comments

Comments
 (0)