summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* maint: improve Gnulib checkingPaul Eggert2022-07-311-0/+10
| | | | | * configure.ac: With --enable-gcc-warnings, #define lint, _FORTIFY_SOURCE, and GNULIB_PORT_CHECK, to better check Gnulib.
* tests: avoid useless variablesAkim Demaille2022-07-311-0/+1
| | | | | | | | Reported by clang's -Wunused-but-set-variable warning. * configure.ac (warn_common): Add -Wunused-but-set-variable. * tests/cxx-type.at: Don't emit location track code when we don't use locations.
* gnulib: updateAkim Demaille2022-07-311-3/+3
| | | | | There are now new files to track. See <https://lists.gnu.org/r/bug-gnulib/2022-07/msg00053.html>.
* package: bump copyrights to 2022Paul Eggert2022-01-151-2/+2
| | | | Run "make update-copyright".
* build: check -Wsubobject-linkage in C++Akim Demaille2021-10-111-1/+2
| | | | * configure.ac (warn_cxx): here.
* CI: don't require Autoconf 2.71Akim Demaille2021-08-191-5/+0
|
* build: modernize to newer Autoconf releasesAkim Demaille2021-08-121-3/+3
| | | | * configure.ac: here.
* build: check for C++ 20 and 2bAkim Demaille2021-08-121-1/+2
| | | | | | | C++20 is released. * configure.ac, m4/bison-cxx-std.m4, tests/atlocal.in, * tests/local.at: Replace 2a with 20, and add support for 2b.
* build: enable -Wmismatched-deallocAkim Demaille2021-08-091-1/+1
| | | | * configure.ac (warn_common): Here.
* Update URLs to prefer https: to http:Paul Eggert2021-01-291-1/+1
| | | | Also, fix a few http: URLs that were no longer working.
* package: bump copyrights to 2021Akim Demaille2021-01-161-2/+2
| | | | Run 'make update-copyright'.
* libtextstyle: be sure to have ostream_printf and hyperlink supportAkim Demaille2020-08-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | Older versions of libtextstyle do not support them, rule them out. Reported by Lars Wendler https://lists.gnu.org/r/bug-bison/2020-07/msg00030.html and by Arnold Robbins https://lists.gnu.org/r/bug-bison/2020-07/msg00041.html and https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003988.html and by Nelson H. F. Beebe https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003993.html With support from Bruno Haible in gnulib https://lists.gnu.org/r/bug-gnulib/2020-08/msg00000.html thread starting at https://lists.gnu.org/r/bug-gnulib/2020-07/msg00148.html * configure.ac: Require libtextstyle 0.20.5. * gnulib: Update.
* Merge maint into HEADAkim Demaille2020-06-031-1/+3
|\ | | | | | | | | | | | | | | | | * upstream/maint: maint: post-release administrivia version 3.6.3 build: check -Wmissing-prototypes tests: show logs c++: fix printing of state number on streams
| * build: check -Wmissing-prototypesAkim Demaille2020-06-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pstate_clear is lacking a prototype. Reported by Ryan https://lists.gnu.org/r/bug-bison/2020-05/msg00101.html Besides, none of the C examples were compiled with the warning flags. * configure.ac (warn_c): Add -Wmissing-prototypes. * data/skeletons/yacc.c (pstate_clear): Make it static. * examples/local.mk (TEST_CFLAGS): New. * examples/c/bistromathic/local.mk, examples/c/calc/local.mk, * examples/c/lexcalc/local.mk, examples/c/mfcalc/local.mk, * examples/c/pushcalc/local.mk, examples/c/reccalc/local.mk, * examples/c/rpcalc/local.mk: Use it. GCC's warn_unused_result is not silenced by a cast to void, so we have to "use" scanf's result. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 Flex generated code produces too many warnings, including things such as, with ICC: examples/c/lexcalc/scan.c(1088): error #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem) 2259 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 2260 ^ 2261 2262 I am tired of trying to fix Flex's output. The project does not seem maintained. We ought to avoid it. So, for the time being, don't try to enable warnings with Flex. * examples/c/bistromathic/parse.y, examples/c/reccalc/scan.l: Fix warnings. * doc/bison.texi: Discard scanf's return value to defeat -Werror=unused-result.
| * build: also provide lzip compressed tarballsAkim Demaille2020-05-101-4/+2
| | | | | | | | | | | | | | | | | | Suggested by Matias Fonzo <selk@dragora.org>. * cfg.mk: Post announcements to bison-announce. * configure.ac: Build lzip packages. * .travis.yml: Build only xz, we don't care about the other formats here.
* | build: check -Wstrict-aliasingAkim Demaille2020-06-011-1/+1
| | | | | | | | * configure.ac (warn_common): Add -Wstrict-aliasing.
* | build: also provide lzip compressed tarballsAkim Demaille2020-05-081-4/+2
|/ | | | | | | | | Suggested by Matias Fonzo <selk@dragora.org>. * cfg.mk: Post announcements to bison-announce. * configure.ac: Build lzip packages. * .travis.yml: Build only xz, we don't care about the other formats here.
* flex: fix incorrect use of Automake conditionalAkim Demaille2020-05-031-1/+2
| | | | | | | AM_CONDITIONAL does _not_ define a shell variable... Reported privately by Denis Excoffier. * configure.ac (LEX_CXX_WORKS): Fix its definition.
* bistromathic: beware of portability of readlineAkim Demaille2020-05-031-0/+7
| | | | | | | | | | Don't try to build bistromathic if we don't have readline. Reported by Bruno Haible. https://lists.gnu.org/r/bug-bison/2020-05/msg00028.html * configure.ac (ENABLE_BISTROMATHIC): New. * examples/c/bistromathic/local.mk: Use it. * examples/c/bistromathic/bistromathic.test: Exit 77 for skip.
* examples: beware of the portability of flex --header-fileAkim Demaille2020-05-031-3/+2
| | | | | | | | | | | | | | The option --header was introduced in version 2.5.6. The option --header-file was introduced in version 2.6.4. Reported by Bruno Haible. https://lists.gnu.org/r/bug-bison/2020-05/msg00013.html So use --header, and do bother with versions that don't support it. * m4/flex.m4: Check whether flex supports --header. * configure.ac (FLEX_WORKS, FLEX_CXX_WORKS): Set to false if it doesn't. * * examples/c/reccalc/local.mk, examples/c/reccalc/Makefile: Use --header rather than --header-file.
* CI: use ICC againAkim Demaille2020-01-191-1/+29
| | | | | | | | See https://github.com/nemequ/icc-travis/issues/15. Thanks to Jeff Hammond and Evan Nemerson for their help. * configure.ac (warn_common): Disable dubious warnings. * .travis.yml: Use ICC again.
* test: report.at: avoid tiny new failureJim Meyering2020-01-191-1/+3
| | | | | | | | | Be robust to newer versions of Autoconf where the package URL defaults to https instead of http. * configure.ac (AC_INIT): Use https. * tests/report.at: Adjust expected output s/http/https/ to match updated URL.
* package: bump copyrights to 2020Akim Demaille2020-01-101-2/+2
| | | | Run 'make update-copyright'.
* tests: also check -Wchar-subscriptsAkim Demaille2019-12-311-1/+2
| | | | | | | | | | | | | GCC's -Wchar-subscripts may report issues on platforms where char is unsigned. Unfortunately the current CI does not reproduce the problem. But that would allow contributors to report issues if the warning appears somewhere. See 139d0655947c87f90af08718618feaaca0e558d7. Problem reported by Andy Fiddaman in: https://lists.gnu.org/r/bug-bison/2019-12/msg00021.html * configure.ac (warn_common): Add -Wchar-subscripts.
* warnings: enable -Wuseless-cast, and eliminate warningsAkim Demaille2019-12-061-2/+8
| | | | | | | | | | | | | | Prompted by Frank Heckenbach. https://lists.gnu.org/archive/html/bug-bison/2019-11/msg00016.html. * configure.ac (warn_cxx): Add -Wuseless-cast. * data/skeletons/c.m4 (b4_attribute_define): Define YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END. * data/skeletons/glr.c (YY_FPRINTF): New, replaces YYFPRINTF, wrapped with YY_IGNORE_USELESS_CAST_BEGIN and YY_IGNORE_USELESS_CAST_END. (YY_DPRINTF): Likewise. * tests/actions.at: Remove useless cast. * tests/headers.at: Adjust.
* doc: clarify build instructionsAkim Demaille2019-11-111-1/+1
| | | | | | | | | * README: A few fixes. Explain how to install color support. * README-hacking: Rename as... * README-hacking.md: this, and convert to Markdown. Improve typography. Improve explanations about update-test.
* c++: fix old cast warningsAkim Demaille2019-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | We still have a few old C casts in lalr1.cc, let's get rid of them. Reported by Frank Heckenbach. Actually, let's monitor all our casts using easy to grep macros. Let's use these macros to use the C++ standard casts when we are in C++. * data/skeletons/c.m4 (b4_cast_define): New. * data/skeletons/glr.c, data/skeletons/glr.cc, * data/skeletons/lalr1.cc, data/skeletons/stack.hh, * data/skeletons/yacc.c: Use it and/or its casts. * tests/actions.at, tests/cxx-type.at, * tests/glr-regression.at, tests/headers.at, tests/torture.at, * tests/types.at: Use YY_CAST instead of C casts. * configure.ac (warn_cxx): Add -Wold-style-cast. * doc/bison.texi: Disable it.
* examples: fix missing dependenciesAkim Demaille2019-10-241-0/+3
| | | | | | | | | | | Reported by Thomas Petazzoni. https://lists.gnu.org/archive/html/bug-bison/2019-08/msg00000.html * examples/c/reccalc/local.mk: Complete dependencies, including for earlier versions of Automake (for sake of our CI, on top of Ubuntu Xenial/Bionic, which feature only Automake 1.15). (%D%/scan.c %D%/scan.h): Upgrade to the full version provided in Automake's documentation.
* build: reenable -Wtype-limitsAkim Demaille2019-10-241-6/+3
| | | | | | | | | | | | | | | | See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html to https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00073.html. Paul Eggert's changes in gnulib do fix the issue for modern GCCs (7, 8, 9) on macOS. Unfortunately these warnings are back on the CI (GNU/Linux) with GCC 4.6, 4.7, (not 4.8) and 4.9. Disable the warning locally. * configure.ac (warn_common, warn_tests): Remove -Wtype-limits. * src/system.h (IGNORE_TYPE_LIMITS_BEGIN, IGNORE_TYPE_LIMITS_END): New. * src/InadequacyList.c, src/parse-gram.c, src/parse-gram.y, * src/symtab.c: Use it.
* build: remove dmalloc supportAkim Demaille2019-10-241-1/+0
| | | | | | | Today sanitizers are a better alternative. * m4/dmalloc.m4: Remove. * configure.ac, src/system.h: Adjust.
* build: disable -Wtautological-constant-out-of-range-compareAkim Demaille2019-10-211-2/+9
| | | | | | | | | Also see e31f92495ce14a5d924b148c8ea1470003cc47c1 and https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html * configure.ac (warn_common): Disable -Wtautological-constant-out-of-range-compare. (warn_tests): Restore it.
* build: disable -Wtype-limits, except in the test suiteAkim Demaille2019-10-201-2/+3
| | | | | | | | | | The current implementation of lib/intprops.h results in "unsigned < 0" comparisons, which triggers warnings. See https://lists.gnu.org/archive/html/bug-bison/2019-10/msg00061.html * configure.ac (warn_common): Disable -Wtype-limits. (warn_tests): Restore it.
* configure: perl is not requiredAkim Demaille2019-10-101-3/+0
| | | | | | But it's used in various places, including in some tests. * configure.ac: here.
* configure: don't require FlexAkim Demaille2019-10-091-2/+2
| | | | | | | | | | | Flex should not be required to build Bison or run the test suite (of course it is needed for maintaining Bison). Yet the Automake conditional FLEX_WORKS does not work. * m4/flex.m4 (_AC_PROG_LEX_YYTEXT_DECL): Since this is called conditionally, don't define LEX_IS_FLEX here, but rather... (AC_PROG_LEX): here. * configure.ac: Be more cautious about possibly undefined variables.
* build: fix distcheckAkim Demaille2019-09-111-0/+11
| | | | | * configure.ac (gl_LIBOBJS): Adjust so that the generated files are indeed the expected ones.
* d: track locationsAkim Demaille2019-06-231-1/+1
| | | | | | | | | | | | | | | * configure.ac (DCFLAGS): Pass -g. * data/skeletons/d.m4 (b4_locations_if): Remove, let bison.m4's one do its job. * data/skeletons/lalr1.d (position): Leave filename empty by default. (position::toString): Don't print empty file names. (location::this): New ctor. (location::toString): Match the implementations of C/C++. (yy_semantic_null): Leave undefined, the previous implementation does not compile. * tests/calc.at: Improve the implementation for D. Enable more checks, in particular using locations. * tests/local.at (AT_YYERROR_DEFINE(d)): Fix its implementation.
* examples: don't run those that require f?lex when it's not availableAkim Demaille2019-05-191-0/+1
| | | | | | | | Reported by Bruno Haible. http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00026.html * configure.ac (FLEX_WORKS): New. * examples/c/lexcalc/local.mk, examples/c/reccalc/local.mk: Use it.
* build: use gettext-hAkim Demaille2019-04-251-1/+1
| | | | | | | | | | | We were using the gnulib's gettext module with tricks in bootstrap.conf to avoid useless files. Instead, use gnulib's gettext-h module. * .travis.yml: Force Gettext 0.18.3 on Trusty. * bootstrap.conf: Use gettext-h instead of gettext. (excluded_files): Remove. * configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.19.
* gnulib: let it use its own PO domainAkim Demaille2019-04-231-0/+1
| | | | | | | | | | See https://www.gnu.org/software/gnulib/manual/html_node/Localization.html. * bootstrap.conf: Create gnulib-po. * Makefile.am, configure.ac: Use it. * po/POTFILES.in: Remove files now in gnulib. * src/main.c: Open the bison-gnulib domain.
* dlang: initial changes to run the calc tests on itAkim Demaille2019-02-261-0/+1
| | | | | | | | | | | | | | | | * configure.ac (DCFLAGS): Define. * tests/atlocal.in: Receive it. * data/skeletons/d.m4 (api.parser.class): Remove spurious YY. * data/skeletons/lalr1.d (yylex): Return an int instead of a YYTokenType, so that we can use characters as tokens. * examples/d/calc.y: Adjust. * tests/local.at: Initial support for D. (AT_D_IF, AT_DATA_GRAMMAR(D), AT_YYERROR_DECLARE(d)) (AT_YYERROR_DECLARE_EXTERN(d), AT_YYERROR_DEFINE(d)) (AT_MAIN_DEFINE(d), AT_COMPILE_D, AT_LANG_COMPILE(d), AT_LANG_EXT(d)): New. * tests/calc.at: Initial support for D. * tests/headers.at
* c++: address -Wweak-vtables warningsAkim Demaille2019-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Derek Clegg http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00021.html aux/parser-internal.h:429:12: error: 'syntax_error' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Werror,-Wweak-vtables] struct syntax_error : std::runtime_error To avoid this warning, we need syntax_error to have a virtual function defined in a compilation unit. Let it be the destructor. To comply with C++98, this dtor should be 'throw()'. Merely making YY_NOEXCEPT be 'throw()' in C++98 triggers errors (http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00022.html), so let's introduce YY_NOTHROW and flag only ~syntax_error with it. Also, since we now have an explicit dtor, we need to provide an copy ctor. * configure.ac (warn_cxx): Add -Wweak-vtables. * data/skeletons/c++.m4 (YY_NOTHROW): New. (syntax_error): Declare the dtor, and define the copy ctor. * data/skeletons/glr.cc, data/skeletons/lalr1.cc (~syntax_error): Define.
* configure: don't try to run C++ warnings on CAkim Demaille2019-01-151-2/+2
| | | | | | | Reported by Derek Clegg. https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00066.html * configure.ac: here.
* c, c++: avoid implicit fall-throwAkim Demaille2019-01-151-1/+2
| | | | | | | | | | | Reported by Derek Clegg. http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00004.html * configure.ac (warn_common): Add -Wimplicit-fallthrough. This does trigger failures in the test suite. * data/skeletons/glr.c, data/skeletons/lalr1.cc, * data/skeletons/yacc.c, tests/c++.at: Make fall-throws explicit.
* c++: avoid -Wundefined-func-template warnings from clangAkim Demaille2019-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Derek Clegg. http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00006.html Clang does not like this: template <typename D> struct basic_symbol : D { basic_symbol(); }; struct by_type {}; struct symbol_type : basic_symbol<by_type> { symbol_type(){} }; It gives: $ clang++-mp-7.0 -Wundefined-func-template foo.cc -c foo.cc:11:3: warning: instantiation of function 'basic_symbol<by_type>::basic_symbol' required here, but no definition is available [-Wundefined-func-template] symbol_type(){} ^ foo.cc:4:3: note: forward declaration of template entity is here basic_symbol(); ^ foo.cc:11:3: note: add an explicit instantiation declaration to suppress this warning if 'basic_symbol<by_type>::basic_symbol' is explicitly instantiated in another translation unit symbol_type(){} ^ 1 warning generated. The same applies for the basic_symbol's destructor and `clear()`. * configure.ac (warn_cxx): Add -Wundefined-func-template. This triggered one failure in the test suite: * tests/headers.at (Sane headers): here, where we check that we can compile the generated headers in other compilation units than the parser's. Add a variant type to make sure that basic_symbol and symbol_type are properly generated in this case. * data/skeletons/c++.m4 (basic_symbol): Inline the definitions of the destructor and of `clear` in the class definition.
* Revert the last two commitsAkim Demaille2019-01-141-1/+1
| | | | | | | | They should not have been pushed, sorry about that. This reverts - commit 8575bd06ae6e65f3a30b21a3e022a968e4c7ae7a. - commit 55bf52860eac5c1394dc344a691220272df32b09.
* c++: avoid warnings about extraneous semi-colonsAkim Demaille2019-01-141-1/+1
| | | | | | | Reported by Derek Clegg. * configure.ac (warn_common): Add -Wextra-semi. * data/skeletons/c++.m4: Remove extraneous semi-colon.
* c++: avoid warnings about extraneous semi-colonsAkim Demaille2019-01-141-1/+1
| | | | | | | | Reported by Derek Clegg. http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00005.html * configure.ac (warn_cxx): Add -Wextra-semi. * data/skeletons/c++.m4: Remove extraneous semi-colon.
* c++: beware of -WshadowAkim Demaille2019-01-131-2/+2
| | | | | | | | | | | | | | | | | | | This line: slice<stack_symbol_type, stack_type> slice (yystack_, yylen); triggers warnings: parse.h:1790:11: note: shadowed declaration is here Reported by Frank Heckenbach. http://lists.gnu.org/archive/html/bug-bison/2019-01/msg00002.html * configure.ac (warn_c): Move -Wshadow to... (warn_common): here. * data/skeletons/stack.hh (slice): Define as an inner class of stack. * data/skeletons/lalr1.cc: Adjust. Rename the variable as 'range' instead of 'slice'.
* package: bump copyrights to 2019Akim Demaille2019-01-051-2/+2
|
* package: make bison a relocatable packageAkim Demaille2018-12-251-0/+1
| | | | | | | | | | | | | | | | | | Suggested by David Barto https://lists.gnu.org/archive/html/help-bison/2015-02/msg00004.html and Victor Zverovich. https://lists.gnu.org/archive/html/bison-patches/2018-10/msg00121.html This is very easy to do, thanks to work by Bruno Haible in gnulib. See "Supporting Relocation" in gnulib's documentation. * bootstrap.conf: We need relocatable-prog and relocatable-script (for yacc). * src/yacc.in: New. * configure.ac, src/local.mk: Instantiate it. * src/main.c, src/output.c (main, pkgdatadir): Use relocatable2. * doc/bison.texi (FAQ): Document it.