Re: two -Werror issues

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hi Alexandre,

> Le 30 sept. 2013 à 11:42, Alexandre Duret-Lutz <[email protected]> a écrit :
> 
> [...]
> 
> Finally I'd suggest to augment the "Invoking Bison" section of the documentation
> with an explanation of what is the difference between a warning and an
> error, and
> a documentation of the exit status of Bison.

What do you think about this?

Thanks, and cheers!

commit a1423e16db8eb361c65756ed10d529a2652f7564
Author: Akim Demaille <[email protected]>
Date:   Fri May 1 10:28:16 2020 +0200

    doc: document the exit status
    
    Suggested by Alexandre Duret-Lutz.
    https://lists.gnu.org/r/bug-bison/2013-09/msg00015.html
    
    * doc/bison.texi (Invocation): Here.

diff --git a/doc/bison.texi b/doc/bison.texi
index f8fa697b..31cd9148 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -10604,6 +10604,26 @@ For compatibility with POSIX, the standard Bison distribution also contains
 a shell script called @command{yacc} that invokes Bison with the @option{-y}
 option.
 
+@sp 1
+
+The exit status of @command{bison} is:
+@table @asis
+@item 0 (success)
+when there were no errors.  Warnings, which are diagnostics about dubious
+constructs, do not change the exit status, unless they are turned into
+errors (@pxref{-Werror,,@option{-Werror}}).
+
+@item 1 (failure)
+when there were errors.  No file was generated (except the reports generated
+by @option{--verbose}, etc.).  In particular, the output files that possibly
+existed were not changed.
+
+@item 63 (mistmatch)
+when @command{bison} does not meet the version requirements of the grammar
+file. @xref{Require Decl}.  No file was generated or changed.
+@end table
+
+
 @menu
 * Bison Options::     All the options described in detail,
                         in alphabetical order by short options.
@@ -10997,6 +11017,7 @@ instance, @option{-Wno-yacc} will hide the warnings about
 POSIX Yacc incompatibilities.
 
 @item -Werror
+@anchor{-Werror}
 Turn enabled warnings for every @var{category} into errors, unless they are
 explicitly disabled by @option{-Wno-error=@var{category}}.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.