On 9/18/18 10:41 AM, Simon Sobisch wrote:
I was told that the installed gnulib only supports VS2015 and above.

Yes, that sounds right.


What do you think about including the following to configure.ac [second
patch ;-)]?

I'm not sure it's worth the effort. Bison doesn't require full support for C99, and it would be a maintenance burden to document the exact set of C99 features it needs, a burden that would fall both on Bison maintainers (who would have to maintain a list of features that almost nobody cares about) and on Bison builders (who would have to read that list and assume it's important and run through the checklist, even though the list would be a waste of time for almost all of them).

I wouldn't even add info about which VS version is needed, since that will likely evolve too. At most I would add a brief note to the FAQ that is easy to maintain as it avoids mentioning specific versions. I installed the attached as an attempt to do that.
>From 336c299ddecc311540ec0d5857170632788c1158 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Tue, 18 Sep 2018 13:16:59 -0700
Subject: [PATCH] doc: document older compiler issues

* doc/bison.texi (Compiler Requirements for GLR):
Rename from Compiler Requirements.
(I can't build Bison): Add FAQ for older compilers.
---
 doc/bison.texi | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/doc/bison.texi b/doc/bison.texi
index db8d7d53..6ab979f1 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -137,7 +137,7 @@ Writing GLR Parsers
 * Merging GLR Parses::     Using GLR parsers to resolve ambiguities.
 * GLR Semantic Actions::   Considerations for semantic values and deferred actions.
 * Semantic Predicates::    Controlling a parse with arbitrary computations.
-* Compiler Requirements::  GLR parsers require a modern C compiler.
+* Compiler Requirements for GLR::  GLR parsers require a modern C compiler.
 
 Examples
 
@@ -795,7 +795,7 @@ merged result.
 * Merging GLR Parses::     Using GLR parsers to resolve ambiguities.
 * GLR Semantic Actions::   Considerations for semantic values and deferred actions.
 * Semantic Predicates::    Controlling a parse with arbitrary computations.
-* Compiler Requirements::  GLR parsers require a modern C compiler.
+* Compiler Requirements for GLR::  GLR parsers require a modern C compiler.
 @end menu
 
 @node Simple GLR Parsers
@@ -1276,7 +1276,7 @@ reports an error.
 Finally, be careful in writing predicates: deferred actions have not been
 evaluated, so that using them in a predicate will have undefined effects.
 
-@node Compiler Requirements
+@node Compiler Requirements for GLR
 @subsection Considerations when Compiling GLR Parsers
 @cindex @code{inline}
 @cindex GLR parsers and @code{inline}
@@ -7188,7 +7188,7 @@ cp /usr/local/share/aclocal/bison-i18n.m4 m4/bison-i18n.m4
 In the top-level @file{configure.ac}, after the @code{AM_GNU_GETTEXT}
 invocation, add an invocation of @code{BISON_I18N}.  This macro is
 defined in the file @file{bison-i18n.m4} that you copied earlier.  It
-causes @samp{configure} to find the value of the
+causes @code{configure} to find the value of the
 @code{BISON_LOCALEDIR} variable, and it defines the source-language
 symbol @code{YYENABLE_NLS} to enable translations in the
 Bison-generated parser.
@@ -12597,6 +12597,17 @@ support is lacking.  You can re-configure Bison with
 gettext from @url{https://ftp.gnu.org/gnu/gettext/} and re-configure
 Bison.  See the file @file{ABOUT-NLS} for more information.
 
+@quotation
+I can't build Bison because my C compiler is too old.
+@end quotation
+
+Except for GLR parsers (@pxref{Compiler Requirements for GLR}), the C
+code that Bison generates requires only C89 or later.  However, Bison
+itself requires common C99 features such as declarations after
+statements.  Bison's @code{configure} script attempts to enable C99 (or
+later) support on compilers that default to pre-C99.  If your compiler
+lacks these C99 features entirely, GCC may well be a better choice; or
+you can try upgrading to your compiler's latest version.
 
 @node Where can I find help?
 @section Where can I find help?
@@ -12638,7 +12649,7 @@ Include information about your compilation environment, including your
 operating system's name and version and your compiler's name and
 version.  If you have trouble compiling, you should also include a
 transcript of the build session, starting with the invocation of
-`configure'.  Depending on the nature of the bug, you may be asked to
+@code{configure}.  Depending on the nature of the bug, you may be asked to
 send additional files as well (such as @file{config.h} or @file{config.cache}).
 
 Patches are most welcome, but not required.  That is, do not hesitate to
-- 
2.17.1

Reply via email to