From 3551d51dd9719778444e0606dd339c4b189c5dcb Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 14 Jan 2019 08:40:06 +0100 Subject: [PATCH] c++: avoid warnings about extraneous semi-colons 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. --- configure.ac | 2 +- data/skeletons/c++.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 7fef652d..e60af602 100644 --- a/configure.ac +++ b/configure.ac @@ -98,7 +98,7 @@ if test "$enable_gcc_warnings" = yes; then -fparse-all-comments -Wdocumentation -Wformat -Wnull-dereference -Wpointer-arith -Wshadow -Wwrite-strings' warn_c='-Wbad-function-cast -Wstrict-prototypes' - warn_cxx='-Wnoexcept' + warn_cxx='-Wextra-semi -Wnoexcept' # Warnings for the test suite only. # # -fno-color-diagnostics: Clang's use of colors in the error diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4 index 137d941b..c985cb98 100644 --- a/data/skeletons/c++.m4 +++ b/data/skeletons/c++.m4 @@ -352,7 +352,7 @@ m4_define([b4_symbol_type_define], typedef basic_symbol super_type; /// Empty symbol. - symbol_type () {}; + symbol_type () {} /// Constructor for valueless symbols, and symbols from each type. ]b4_type_foreach([_b4_token_constructor_define])dnl