From 0b093ac4d9042355b95e67ad25b03e69ba213545 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 12 Sep 2019 18:09:26 +0200 Subject: [PATCH 1/6] maint: post-release administrivia * NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update. --- .prev-version | 2 +- NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.prev-version b/.prev-version index 47b322c9..4d9d11cf 100644 --- a/.prev-version +++ b/.prev-version @@ -1 +1 @@ -3.4.1 +3.4.2 diff --git a/NEWS b/NEWS index 2048eb71..bb9ec9a3 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ GNU Bison NEWS +* Noteworthy changes in release ?.? (????-??-??) [?] + + * Noteworthy changes in release 3.4.2 (2019-09-12) [stable] ** Bug fixes From b2c381cd253be2c08a2e01c3bed3f0183f422596 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 21 Sep 2019 15:01:45 +0200 Subject: [PATCH 2/6] quotearg: avoid leaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Tomasz Kłoczko. https://lists.gnu.org/archive/html/bug-bison/2019-09/msg00008.html * src/main.c (main): Free quotearg's memory later. --- THANKS | 1 + src/main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/THANKS b/THANKS index 2df6763c..4d2b25f7 100644 --- a/THANKS +++ b/THANKS @@ -180,6 +180,7 @@ Tobias Frost tobi@debian.org Todd Freed todd.freed@gmail.com Tom Lane tgl@sss.pgh.pa.us Tom Tromey tromey@cygnus.com +Tomasz Kłoczko kloczko.tomasz@gmail.com Tommy Nordgren tommy.nordgren@chello.se Troy A. Johnson troyj@ecn.purdue.edu Tys Lefering gccbison@gmail.com diff --git a/src/main.c b/src/main.c index 3c51eafe..06bcb1c5 100644 --- a/src/main.c +++ b/src/main.c @@ -223,7 +223,6 @@ main (int argc, char *argv[]) muscle_free (); code_scanner_free (); skel_scanner_free (); - quotearg_free (); timevar_pop (tv_free); if (trace_flag & trace_bitsets) @@ -249,6 +248,7 @@ main (int argc, char *argv[]) uniqstrs_free (); complain_free (); + quotearg_free (); return complaint_status ? EXIT_FAILURE : EXIT_SUCCESS; } From b3e9c2022744fc64cf921227ef6f7f084b827e08 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 14 Sep 2019 10:14:32 +0200 Subject: [PATCH 3/6] tests: pass -jN from Make to the test suite I am sooooo tired of typing "make -j5 TESTSUITEFLAGS=-j5"... Should have done this years ago. * cfg.mk (TESTSUITEFLAGS): here. --- README-hacking | 10 +++++++--- cfg.mk | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README-hacking b/README-hacking index 4a977a35..ee77bb8b 100644 --- a/README-hacking +++ b/README-hacking @@ -45,8 +45,8 @@ processes tabs in its input. * Working from the repository -These notes intend to help people working on the checked-out sources. -These requirements do not apply when building from a distribution tarball. +These notes intend to help people working on the checked-out sources. These +requirements do not apply when building from a distribution tarball. ** Requirements @@ -201,7 +201,6 @@ added the "[-Wother]" part to all the warnings). Part of the update can be done with a crude tool: tests/update-test. Read it for more information. ** TESTSUITEFLAGS - To run just the testsuite (not the tests related to the examples), run `make check-local`. @@ -212,6 +211,10 @@ can be sped up in two ways: Using -j, in a make-like fashion, for example: $ make check-local TESTSUITEFLAGS='-j8' +Actually, when using GNU Make, TESTSUITEFLAGS defaults to the -jN passed to +it, so you may simply run + $ make check-local -j8 + Running only the tests of a certain category, as specified in the AT files with AT_KEYWORDS([[category]]). Categories include: - c++, for c++ parsers @@ -224,6 +227,7 @@ To run a specific set of tests, use -k (for "keyword"). For example: $ make check-local TESTSUITEFLAGS='-k c++' Both can be combined. + $ make check-local TESTSUITEFLAGS='-j8 -k c++' ** Typical errors If the test suite shows failures such as the following one diff --git a/cfg.mk b/cfg.mk index a4383fc8..1170d6f3 100644 --- a/cfg.mk +++ b/cfg.mk @@ -26,6 +26,9 @@ regen: _version manual_title = The Yacc-compatible Parser Generator gendocs_options_ = -I $(abs_top_srcdir)/doc -I $(abs_top_builddir)/doc +# By default, propagate -j from make to Bison's test suite. +TESTSUITEFLAGS = $(filter -j%,$(MAKEFLAGS)) + # It's useful to run maintainer-check* targets during development, but we # don't want to wait on a recompile because of an update to $(VERSION). Thus, # override the _is-dist-target from GNUmakefile so that maintainer-check* From 8add45dbd9f17864f05123ad680431e2b062d72b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 14 Sep 2019 09:54:03 +0200 Subject: [PATCH 4/6] CI: disable ICC It seems that Intel changed something in their license management. https://github.com/nemequ/icc-travis/issues/15 --- .travis.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01bebe74..5f0011c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -113,21 +113,22 @@ jobs: # Do not use ASAN with ubuntu's libc++: https://bugs.llvm.org/show_bug.cgi?id=17379 - MATRIX_EVAL="PART=2 CC='clang-8 -fsanitize=address' CXX='clang++-8 -fsanitize=address -stdlib=libc++'" - - name: "ICC" - stage: test - # We need the build-aux/install-icc.sh script. - git: - clone: true - submodules: false - depth: 1 - os: linux - dist: xenial - env: - # ICC's warnings are often very wrong (e.g., it thinks foo ? - # "bar" : "baz" is char* instead of const char*), so don't try - # to work around the, and obviously, don't die on them. - - MATRIX_EVAL="CC=icc && CXX=icpc" - - MAKE_ARGS='WERROR_CFLAGS= WERROR_CXXFLAGS=' + # Currently no longer works (https://github.com/nemequ/icc-travis/issues/15). + # - name: "ICC" + # stage: test + # # We need the build-aux/install-icc.sh script. + # git: + # clone: true + # submodules: false + # depth: 1 + # os: linux + # dist: xenial + # env: + # # ICC's warnings are often very wrong (e.g., it thinks foo ? + # # "bar" : "baz" is char* instead of const char*), so don't try + # # to work around the, and obviously, don't die on them. + # - MATRIX_EVAL="CC=icc && CXX=icpc" + # - MAKE_ARGS='WERROR_CFLAGS= WERROR_CXXFLAGS=' ## ----- ## From 97c4169f23c51176f14211f158f000ade3c65e28 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 21 Sep 2019 10:08:26 +0200 Subject: [PATCH 5/6] CI: show git status --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f0011c8..be396eaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,8 @@ git: # (https://docs.travis-ci.com/user/conditional-builds-stages-jobs/). jobs: include: - - stage: "compile" + - stage: compile + name: "Make dist" git: clone: true dist: bionic @@ -55,6 +56,8 @@ jobs: - ./configure --enable-gcc-warnings || { cat config.log && false; } - make -j2 - make -j2 dist + # Can help understanding why we get "dirty" tarballs. + - git status - dist=$(echo bison*.xz) # Unfortunately we cannot deterministically know the name of the tarball without the full From 406e8c7c02daf1b74eeacf9831763ceec128ab9b Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 25 Sep 2019 19:34:34 +0200 Subject: [PATCH 6/6] c++: add copy ctors for compatibility with the IAR compiler Reported by Andreas Damm. https://savannah.gnu.org/support/?110032 * data/skeletons/lalr1.cc (stack_symbol_type::operator=): New overload, const, to please the IAR C++ compiler (version ca 2013). --- THANKS | 1 + data/skeletons/lalr1.cc | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/THANKS b/THANKS index 4d2b25f7..2cdd9b0b 100644 --- a/THANKS +++ b/THANKS @@ -10,6 +10,7 @@ Albert Chin-A-Young china@thewrittenword.com Alexander Belopolsky alexb@rentec.com Alexandre Duret-Lutz adl@lrde.epita.fr Andre da Costa Barros andre.cbarros@yahoo.com +Andreas Damm adamm@onica.com Andreas Schwab schwab@suse.de Andrew Suffield asuffield@users.sourceforge.net Angelo Borsotti angelo.borsotti@gmail.com diff --git a/data/skeletons/lalr1.cc b/data/skeletons/lalr1.cc index d1c30403..3e1ac445 100644 --- a/data/skeletons/lalr1.cc +++ b/data/skeletons/lalr1.cc @@ -335,6 +335,10 @@ m4_define([b4_shared_declarations], /// Assignment, needed by push_back by some old implementations. /// Moves the contents of that. stack_symbol_type& operator= (stack_symbol_type& that); + + /// Assignment, needed by push_back by other implementations. + /// Needed by some other old implementations. + stack_symbol_type& operator= (const stack_symbol_type& that); #endif }; @@ -627,6 +631,17 @@ m4_if(b4_prefix, [yy], [], } #if YY_CPLUSPLUS < 201103L + ]b4_parser_class[::stack_symbol_type& + ]b4_parser_class[::stack_symbol_type::operator= (const stack_symbol_type& that) + { + state = that.state; + ]b4_variant_if([b4_symbol_variant([that.type_get ()], + [value], [copy], [that.value])], + [[value = that.value;]])[]b4_locations_if([ + location = that.location;])[ + return *this; + } + ]b4_parser_class[::stack_symbol_type& ]b4_parser_class[::stack_symbol_type::operator= (stack_symbol_type& that) {