Commit Graph

1296 Commits

Author SHA1 Message Date
Akim Demaille
7c4b40de61 build: remove a few copies of the Copyright from the generated Makefile
* build-aux/local.mk, cfg.mk, examples/calc++/local.mk,
* examples/local.mk, examples/mfcalc/local.mk,
* examples/rpcalc/local.mk, lib/local.mk, src/local.mk,
* tests/local.mk:
Use Automake comments so that we don't get a copy of each in the
generated Makefile.
2018-10-24 06:18:57 +02:00
Akim Demaille
ba9db64745 printf returns a signed int
* tests/local.at: Adjust location_print's signature.
2018-10-22 17:49:08 +02:00
Akim Demaille
b4b8666e4a tests: be strict about types
* tests/actions.at, tests/c++.at, tests/cxx-type.at,
* tests/glr-regression.at, tests/local.at, tests/torture.at,
* tests/types.at:
Pay stricter attention to types to avoid warnings.
2018-10-22 17:49:06 +02:00
Akim Demaille
85f7c08036 tests: refactor
* tests/actions.at, tests/synclines.at: Prefer iteration to
copy-paste.
2018-10-21 08:28:50 +02:00
Akim Demaille
098f5084a0 tests: rename AT_SKEL_CC_IF/AT_SKEL_JAVA_IF as AT_CXX_IF/AT_JAVA_IF
The previous name is too obscure, and the other macros for C++ use
CXX, not CC.

* tests/local.at (AT_SKEL_CC_IF, AT_SKEL_JAVA_IF): Rename as...
(AT_CXX_IF, AT_JAVA_IF): these.
Adjust callers.
2018-10-21 08:28:47 +02:00
Akim Demaille
07a4b32f4d c++: check that emplace for rvalues works
See the previous commit.

* tests/local.at (AT_REQUIRE_CXX_VERSION): New.
* tests/types.at (api.value.type): Check emplace in C++14.
2018-10-21 08:02:52 +02:00
Akim Demaille
e7b709ab0b %printer: promote yyo rather than yyoutput
* doc/bison.texi: Promote yyo rather than yyoutput.

* data/c.m4, data/glr.cc, tests/types.at, tests/calc.at,
tests/regression.at: Adjust.
2018-10-20 19:03:01 +02:00
Akim Demaille
3967e46a2d lalr1.cc: fix stack symbol move
In some casing, once we moved a stack symbol, we forget to mark the
source stack symbol as emptied.  As a consequence, it may be destroyed
a second time.

This happens when the stack has to be resized.

* data/lalr1.cc (stack_symbol_type::stack_symbol_type): Record that
the source was emptied.
(stack_symbol_type::operator=): Likewise.
* tests/c++.at (C++ Variant-based Symbols Unit Tests): Force the stack
to be resized.  Check its content.
2018-10-18 07:15:30 +02:00
Akim Demaille
5cdbc97c9d pacify syntax-checks
* lib/lbitset.c, tests/c++.at: here.
* cfg.mk: Add exceptions.
2018-10-16 18:54:06 +02:00
Akim Demaille
ea31f21fd8 C++: let %require "3.2" disable the generation of obsolete files
The files stack.hh and position.hh are deprecated.  Rather than
devoting specify %define variables to discard them (api.position.file
and api.stack.file), and rather than having to use special rules when
api.location.file is used, let's simply decide that from %require
"3.2" onwards, these files will not be generated.

The only noticeable thing here is that, in order to be able to check
the behavior of %require "3.2", to have this version (which is still
3.1-*) to accept %require "3.2".

* src/gram.h, src/gram.c (required_version): New.
* src/parse-gram.y (version_check): Set it.
* src/output.c (prepare): Pass it m4.
* data/bison.m4 (b4_required_version_if): Receive it and use it.
* data/location.cc, data/stack.hh: Replace the api.*.file with only
required version comparison.
* tests/input.at: No longer check api.stack.file and api.position.file.
* NEWS, doc/bison.texi: Don't mention them.
Document the %require 3.2 behavior.
* tests/output.at: Use %require 3.2 instead.
2018-10-16 13:33:32 +02:00
Akim Demaille
01898726e2 generate the default semantic action
Currently, in C, the default semantic action is implemented by being
always run before running the actual user semantic action.  As a
consequence, when the user action is run, $$ is already set as $1.

In C++ with variants, we don't do that, since we cannot manipulate the
semantic value without knowing its exact type.  When variants are
enabled, the only guarantee is that $$ is default contructed and ready
to the used.

Some users still would like the default action to be run with
variants.  Frank Heckenbach's parser in
C++17 (http://lists.gnu.org/archive/html/bug-bison/2018-04/msg00011.html)
provides this feature, but relying on std::variant's dynamic typing,
which we forbid in lalr1.cc.

The simplest seems to be actually generating the default semantic
action (in all languages/skeletons).  This makes the pre-action (that
sets $$ to $1) useless.  But...  maybe some users depend on this, in
spite of the comments that clearly warn againt this.  So let's not
turn this off just yet.

* src/reader.c (grammar_rule_check_and_complete): Rename as...
(grammar_rule_check_and_complete): this.
Install the default semantic action when applicable.
* examples/variant-11.yy, examples/variant.yy, tests/calc.at:
Exercise the default semantic action, even with variants.
2018-10-14 18:53:21 +02:00
Akim Demaille
b8351d06f1 C++: issue a better CPP guard and Doxygen file command
Currently we use "<dir><api.location.file>" as \file argument, and as
base for the CPP guard.  This is not nice when <dir> is absolute, in
which case it is expected that the user will use api.location.include
to get something nicer.  If defined, use that name instead.

* data/location.cc (b4_location_path): New.
Use it.
* tests/c++.at (Shared locations): Check the guard and Doxygen doc.
2018-10-09 18:58:50 +02:00
Akim Demaille
5fe636c7ee c++: provide a means to control how location.hh is included
Users may want to generate the location file elsewhere, say
$top_srcdir/include/ast/location.hh.  Yet, we should not generate
`#include "$top_srcdir/include/ast/location.hh"` but probably
something like `#include <ast/location.hh>`, or `#include
"ast/location.hh", or `#include <location.hh>`.  It entirely depends
on the compiler flags (-I/-isystem) that are used.  Bison cannot guess
what is expected, so let's give the user a means to tell how the
location file should be included.

* data/location.cc (b4_location_file): New.
* data/glr.cc, data/lalr1.cc: Use it.
2018-10-06 18:13:48 +02:00
Akim Demaille
50b8d4ba5a c++: support absolute api.location.file names
In the case a user wants to create location.hh elsewhere, it can be
helpful to define api.location.file to some possibly absolute path
such as -Dapi.location.file='"$(top_srcdir)/include/ast/location.hh"'.
Currently this does not work with `-o foo/parser.cc`, as we join foo/
and $(top_srcdir) together, the latter starting with slash.

We should not try to do that in m4, manipulating file names is quite
complex when you through Windows file name in.  Let m4 delegate this
to gnulib.

* src/scan-skel.l (at_output): Accept up to two arguments.
* data/bison.m4 (b4_output): Adjust.
* tests/skeletons.at (Fatal errors but M4 continues producing output):
Adjust to keep the error.

* data/location.cc, data/stack.hh: Leave the concatenation to @output.
* tests/output.at: Exercise api.location.file with an absolute path.
2018-10-06 17:17:25 +02:00
Akim Demaille
57d69b04b2 c++: when api.location.file is defined, don't generate stack.hh
Make it easier to have fewer files.

* data/stack.hh: Don't generate stack.hh when api.location.file is
specified.
* tests/calc++.at, tests/output.at: Adjust tests.
2018-10-06 17:17:25 +02:00
Akim Demaille
3e6a075f7f c++: make position.hh completely useless
Let's put the definition of position into location.hh, there's no real
value in keeping them separate: they are small, and share the same
requirements.

To help users transition to this new model, still generate position.hh
by default, but as a simple include to location.hh.

* data/location.cc (api.position.file): Accept only 'none' as possible
value.
(position.hh): Make it a stub.
(location.hh): Adjust.
(b4_position_define): Merge into...
(b4_location_define): this.
* data/glr.cc, data/lalr1.cc, tests/input.at, tests/output.at: Adjust.
2018-10-06 17:17:25 +02:00
Akim Demaille
29b1da4e18 c++: make stack.hh completely useless
Let's completely deprecate stack.hh.  Don't provide a means to give it
a new name, allow only its removal.

See https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00151.html
and https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00182.html.

* data/stack.hh: Reduce stack.hh to a simple comment explaining how to
get rid of it.
* data/lalr1.cc: Adjust
* tests/input.at (%define file variables): Adjust.
* tests/output.at: Remove cases where stack.hh was removed.
2018-10-06 17:17:25 +02:00
Akim Demaille
667588ee8a c++: add support for api.position.file and api.location.file
* data/location.cc: Sort includes.
(b4_position_file, b4_location_file): New.
When there's a file for locations but not for positions, include the
definition of position in the location file.
* data/lalr1.cc (b4_shared_declarations): Include the
position/location file when it exists.
Otherwise, define the class.
* data/glr.cc: Likewise.
* tests/input.at (%define file variables): Check them.
* tests/output.at (C++ output): Check various cases with
api.position.file and api.location.file.
2018-10-06 17:17:25 +02:00
Akim Demaille
b122a71c83 c++: provide control over the stack.hh file name
It was not a good idea to generate the file stack.hh.  It never was.
But now we have to deal with backward compatibility: if we stop
generating it, the build system of some build system will probably
break.

So offer the user a means to (i) decide what the name of the output
file should be, and (ii) not generate this file at all (its content
will be inline where the parser is defined).

* data/lalr1.cc (b4_percent_define_check_file_complain)
(b4_percent_define_check_file): New.
* data/stack.hh: Generate the file only if api.stack.file is not
empty.
In that case, use it as file name.
* data/lalr1.cc: Adjust to include the right file, or to include
the definition of stack.
* tests/calc.at, tests/output.at: Exercise api.stack.file.
2018-10-06 17:17:25 +02:00
Akim Demaille
1a0b3bf83b tests: c++: don't fuse prefix and namespace
They are not the same concept.  It appears that we still consider that
api.prefix is the default for api.namespace.  We should stop that.

* tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
Separate namespace and prefix.
Adjust dependencies.
2018-10-06 17:16:55 +02:00
Akim Demaille
53bde230c6 style: tests: factor file extension computations
* tests/local.at (AT_LANG_HDR): New.
* tests/calc.at, tests/headers.at, tests/synclines.at: Use it, and
AT_LANG_EXT.
2018-10-06 17:16:54 +02:00
Josh Soref
d573ef0d69 spelling: suppress 2018-10-05 07:01:05 +02:00
Josh Soref
6cdd3287dd spelling: succesful 2018-10-05 07:01:05 +02:00
Josh Soref
13b70e2218 spelling: minimal 2018-10-05 07:01:05 +02:00
Josh Soref
3c2b71cde6 spelling: included 2018-10-05 07:01:05 +02:00
Josh Soref
bb077f38f7 spelling: compatibility 2018-10-05 07:01:04 +02:00
Josh Soref
795f7e32cc spelling: combination 2018-10-05 07:01:04 +02:00
Akim Demaille
26859f6d61 main: fix error message for missing argument
* src/getargs.c (getargs): Don't display any argv other that argv[0]
when reporting a missing argument.
* tests/bison.in: Neutralize path differences in stderr.
* tests/input.at (Invalid number of arguments): New.
2018-10-04 22:24:11 +02:00
Akim Demaille
cf4e3eecef c++: fix warning message for automove
* src/scan-code.l: Remove 'enabled'.
Use only $k (numeric), even for named references, for clarity.
* tests/c++.at: Adjust expectations.
2018-09-24 21:52:55 +02:00
Akim Demaille
6537a59c98 tests: fix a memory leak
This has been bugging me for while.  I was hard to reproduce: it
worked only on GNU/Linux, probably because libc++ implements the small
string optimization, while libstdc++ did not and actually allocated on
the heap for this small string.

See https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00110.html.

* tests/types.at (api.value.type): Do not provide a semantic value to
EOF.
2018-09-23 11:50:58 +02:00
Akim Demaille
a874011e37 c++: issue a warning with a value is moved several times
Suggested by Frank Heckenbach.
http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00022.html

* src/scan-code.l (parse_ref): Check multiple occurrences of rhs
values.
* tests/c++.at (Multiple occurrences of $n and api.value.automove): New.
2018-09-22 11:22:31 +02:00
Akim Demaille
3eb9042a30 c++: introduce api.value.automove
Based on work by Frank Heckenbach.
See http://lists.gnu.org/archive/html/bug-bison/2018-04/msg00000.html
and http://lists.gnu.org/archive/html/bug-bison/2018-09/msg00019.html.

* data/lalr1.cc (b4_rhs_value): Use YY_MOVE api.rhs.automove is set.
* doc/bison.texi (%define Summary): Document api.rhs.automove.
* examples/variant-11.yy: Use it.

* tests/local.at (AT_AUTOMOVE_IF): New.
* tests/c++.at (Variants): Check move semantics.
2018-09-22 09:49:46 +02:00
Akim Demaille
aa5de5728c tests: c++: use a custom string type
The forthcoming automove feature, to be properly checked, will require
that we can rely on the value of a moved-from string, which is not
something the C++ standard guarantees.  So introduce our own wrapper.

Suggested by Frank Heckenbach.
https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00111.html

* tests/c++.at (Variants): Introduce and use a new 'string' class.
2018-09-22 09:49:42 +02:00
Akim Demaille
21eeee46e9 tests: prepare a test for automove
The 'Variants' tests are well suited to check support for move, and in
particular for the forthcoming automove feature.  But the tests were
written to show the best practice in C++98, using swap:

    list "," item { std::swap ($$, $1); $$.push_back ($3); }

This cannot work with std::move.  So, make this example simpler, based
on regular assignment instead of swap, which is a regression for
C++98 (as the new traces show), but will be an improvement for modern
C++ with automove.

* tests/c++.at (Variants): Stop using swap.
We don't generate a header file, so remove the 'require' code section.
Adjust expectations.
2018-09-22 08:22:48 +02:00
Akim Demaille
27630864e7 build: work around ICC's limitations
Several types of failures.  First, unable to pass the file name
properly to the linker.

    ./synclines.at:416: $CC $CFLAGS $CPPFLAGS  $LDFLAGS -o \"\\\"\" \"\\\"\".c $LIBS
    stderr:
    ld: cannot open output file "/"": No such file or directory
    stdout:

Unable to save under such a file name.

    ./synclines.at:421: $CXX $CXXFLAGS $CPPFLAGS -c $LDFLAGS -o \"\\\"\" \"\\\"\".cc $LIBS
    stderr:
    error: can't open file "/"" for write
    compilation aborted for "\"".cc (code 1)

Spurious output because of warning flags is failed to reject as an
error during configure:

    ./headers.at:343: $CXX $CXXFLAGS $CPPFLAGS $LDFLAGS c-only.o cxx-only.o -o c-and-cxx ||
              exit 77
    --- /dev/null	2018-09-18 21:21:37.745649000 +0000
    +++ /home/travis/build/akimd/bison/tests/testsuite.dir/at-groups/222/stderr	2018-09-18 21:28:17.291919519 +0000
    @@ -0,0 +1,7 @@
    +icpc: command line warning #10006: ignoring unknown option '-Wcast-align'
    +icpc: command line warning #10006: ignoring unknown option '-fparse-all-comments'
    +icpc: command line warning #10006: ignoring unknown option '-Wdocumentation'
    +icpc: command line warning #10006: ignoring unknown option '-Wnull-dereference'
    +icpc: command line warning #10006: ignoring unknown option '-Wnoexcept'
    +icpc: command line warning #10006: ignoring unknown option '-fno-color-diagnostics'
    +icpc: command line warning #10006: ignoring unknown option '-Wno-keyword-macro'
    stdout:

* tests/local.at (AT_SKIP_IF_CANNOT_LINK_C_AND_CXX): Also ignore
stderr, as with ICC we get
* tests/synclines.at (syncline escapes): Don't link the output.
2018-09-20 06:30:46 +02:00
Akim Demaille
bbfa419b89 style: use midrule only, not mid-rule
The code was already using midrule only, never mid_rule.  This is
simpler to remember, and matches a similar change we made from
look-ahead to lookahead.

* NEWS, doc/bison.texi, src/reader.c, src/scan-code.h, src/scan-code.l
* tests/actions.at, tests/c++.at, tests/existing.at: here.
2018-09-19 22:09:53 +02:00
Akim Demaille
3367d8dd5c build: strengthen the C++ standard flag test
On the CI, we have this spurious failure with clang 3.9 with
-std=c++17:

    In file included from list.y:23:
    In file included from /usr/include/c++/4.8/iostream:39:
    In file included from /usr/include/c++/4.8/ostream:38:
    In file included from /usr/include/c++/4.8/ios:42:
    In file included from /usr/include/c++/4.8/bits/ios_base.h:41:
    In file included from /usr/include/c++/4.8/bits/locale_classes.h:40:
    In file included from /usr/include/c++/4.8/string:52:
    In file included from /usr/include/c++/4.8/bits/basic_string.h:2815:
    In file included from /usr/include/c++/4.8/ext/string_conversions.h:43:
    /usr/include/c++/4.8/cstdio:120:11: error: no member named 'gets' in the global namespace
      using ::gets;
            ~~^

This shows that our test, based on gl_WARN_ADD, is a joke.  We have to
really check for at least a bit of C++.

* m4/ax_check_compile_flag.m4, m4/bison-cxx-std.m4: New.
* configure.ac: Use them to make sure the compiler actually works.
2018-09-18 13:21:38 +02:00
Akim Demaille
8da0cef821 tests: fix memory leak
This was reported by ASAN on the CI.

* tests/types.at (api.value.type): Don't set a semantic value to EOF.
2018-09-18 13:21:38 +02:00
Akim Demaille
7c64b1f4ff tests: fight G++ warnings about zero as null pointer constant
In C++ pre C++11 it is standard practice to use 0 for the null pointer.
But GCC pre 8 -std=c++98 with -Wzero-as-null-pointer-constant warns about
this.

So disable -Wzero-as-null-pointer-constant when compiling C++ pre 11.
Let's do this in AT_DATA_SOURCE_PROLOGUE (which is pasted on top of
all the test grammar files).  Unfortunately, that shifts all the
locations in the expected error messages, which would be too noisy.
Instead, let's introduce testsuite.h, which can vary in length, and
include it in AT_DATA_SOURCE_PROLOGUE.

* tests/testsuite.h: New.
Disable -Wzero-as-null-pointer-constant's warning with GCC pre 8,
C++ pre 11.
* tests/local.at (AT_DATA_SOURCE_PROLOGUE): Use it.
* tests/atlocal.in (CPPFLAGS): Find it.
* tests/local.mk: Ship it.
* data/c.m4 (YY_NULLPTR): Prefer ((void*)0) to 0 in C.
2018-09-18 13:21:38 +02:00
Akim Demaille
d4fbda2a94 style: prefer %D% in Automake files
* tests/local.mk: Prefer %D%/ to tests/.
2018-09-16 16:20:39 +02:00
Akim Demaille
9ff76cdda8 tests: run the C++ tests on all the available standards
This is much of course more efficient than in the matrix of the CI (or
on our own machines), but a bit more tedious.

* configure.ac (CXX03_CXXFLAGS, CXX11_CXXFLAGS, CXX14_CXXFLAGS)
(CXX17_CXXFLAGS, CXX2A_CXXFLAGS, STDCXX_FLAGS): New.
* tests/atlocal.in: Receive them.
* tests/local.at (AT_FOR_EACH_CXX): New.
* tests/c++.at: Use AT_FOR_EACH_CXX.
2018-09-13 19:01:42 +02:00
Akim Demaille
84744e5f63 tests: allow to override variables with envvars
* tests/atlocal.in: Allow the user to change interesting variables
(CFLAGS, CXXFLAGS, etc.).
2018-09-13 19:01:42 +02:00
Akim Demaille
09bc1b99c9 lalr1.cc: modern C++ no longer needs an assignment for symbols
Reported by Frank Heckenbach.
http://lists.gnu.org/archive/html/bug-bison/2018-03/msg00002.html

Actually the assignment operator should never be needed: the C++98
requirements for vector::push_back is CopyInsertable, which does not require
an assignment operator.  However, libstdc++ shipped with GCC up to (and
including) 6 uses the assignment operator (which affects Clang on top of
libstdc++, but also ICC).  So let's keep it for legacy C++.

See https://gcc.godbolt.org/z/q0XXmC.

* data/lalr1.cc (stack_symbol_type::operator=): Remove.
* data/c++.m4 (basic_symbol::operator=): Ditto.
* tests/c++.at (C++ Variant-based Symbols Unit Tests): Adjust.
2018-09-13 19:01:42 +02:00
Akim Demaille
f19ecae3b2 lalr1.cc: support move semantics
Modern C++ (i.e., C++11 and later) introduced "move only" types: types such
as std::unique_ptr<T> that can never be duplicated.  They must never be
copied (by assignments and constructors), they must be "moved".  The
implementation of lalr1.cc used to copy symbols (including their semantic
values).  This commit ensures that values are only moved in modern C++, yet
remain compatible with C++98/C++03.

Suggested by Frank Heckenbach, who provided a full implementation on
top of C++17's std::variant.
See http://lists.gnu.org/archive/html/bug-bison/2018-03/msg00002.html,
and https://lists.gnu.org/archive/html/bison-patches/2018-04/msg00002.html.

Symbols (terminal/non terminal) are handled by several functions that used
to take const-refs, which resulted eventually in a copy pushed on the stack.
With modern C++ (C++11 and later) the callers must use std::move, and the
callees must take their arguments as rvalue refs (foo&&).  In order to avoid
duplicating these functions to support both legacy C++ and modern C++, let's
introduce macros (YY_MOVE, YY_RVREF, etc.)  that rely on copy-semantics for
C++98/03, and move-semantics for modern C++.

That's easy for inner types, when the parser's functions pass arguments to
each other.  Functions facing the user (make_NUMBER, make_STRING, etc.)
should support both rvalue-refs (for instance to support move-only types:
make_INT (std::make_unique<int> (1))), and lvalue-refs (so that we can pass
a variable: make_INT (my_int)).  To avoid the multiplication of the
signatures (there is also the location), let's take the argument by value.

See:
https://lists.gnu.org/archive/html/bison-patches/2018-09/msg00024.html.

* data/c++.m4 (b4_cxx_portability): New.
(basic_symbol): In C++11, replace copy-ctors with move-ctors.
In C++11, replace copies with moves.
* data/lalr1.cc (stack_symbol_type, yypush_): Likewise.
Use YY_MOVE to avoid useless copies.
* data/variant.hh (variant): Support move-semantics.
(make_SYMBOL): In C++11, in order to support both read-only lvalues,
and rvalues, take the argument as a copy.
* data/stack.hh (yypush_): Use rvalue-refs in C++11.
* tests/c++.at: Use move semantics.

* tests/headers.at: Adjust to the new macros (YY_MOVE, etc.).

* configure.ac (CXX98_CXXFLAGS, CXX11_CXXFLAGS, CXX14_CXXFLAGS)
(CXX17_CXXFLAGS, ENABLE_CXX11): New.
* tests/atlocal.in: Receive them.

* examples/variant.yy: Don't define things in std.
* examples/variant-11.test, examples/variant-11.yy: New.
Check the support of move-only types.
* examples/README, examples/local.mk: Adjust.
2018-09-13 19:01:33 +02:00
Akim Demaille
e3257f88e2 tests: factor the definition of full compilation
* tests/local.at (AT_LANG_EXT): New.
(AT_FULL_COMPILE): Simplify.
2018-09-12 22:06:23 +02:00
Akim Demaille
9268d9aceb tests: fix target naming convention
We have some maintainer-check-foo and some maintainer-foo-check.  Keep
only the former.

* tests/local.mk (maintainer-push-check, maintainer-xml-check)
(maintainer-release-check): Rename as...
(maintainer-check-push, maintainer-check-xml)
(maintainer-check-release): these.
2018-09-06 21:28:24 +02:00
Akim Demaille
bb5603c2f0 tests: fix variable naming convention
Most of our variables for C++ flags are named FOO_CXXFLAGS, not
CXXFLAGS_FOO.

* configure.ac, tests/atlocal.in, tests/calc.at
(NO_EXCEPTIONS_CXXFLAGS): Rename as...
(CXXFLAGS_NO_EXCEPTIONS): this.
2018-09-06 21:28:24 +02:00
Akim Demaille
2c29a70819 tests: fix maintainer-check-g++ make recipe
Clang++ issues warnings when it's used to compile C.  This make target
is precisely checking whether we can do that.

* configure.ac (NO_DEPRECATED_CXXFLAGS): New.
* tests/atlocal.in: Use it.
2018-09-06 21:28:24 +02:00
Akim Demaille
cf31256f9a tests: fix maintainer-check-valgrind make recipe
* tests/local.mk (maintainer-check-valgrind): Run the with Valgrind
when it's available, not the converse.
2018-09-06 21:28:24 +02:00
Akim Demaille
d023679818 tests: style changes
* tests/c++.at: Formatting changes.
Use 'using' to shorten the code.
2018-09-04 13:46:13 +02:00