diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-03-22 11:57:58 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-03-22 15:59:13 +0100 |
commit | 4cfb067d93836aa22e11c538103e3067dc494882 (patch) | |
tree | d66b1931b1c85a65f400de5a7b90091c91679c97 /etc | |
parent | cf60d0a617d27f10d9f5af92b0c34c2d174e1430 (diff) | |
download | bison-4cfb067d93836aa22e11c538103e3067dc494882.tar.gz |
bench: use a C++-11 compiler
See https://github.com/google/benchmark#a-faster-keeprunning-loop.
* etc/bench.pl.in ($cxx): Be C++11.
(&bench_with_gbenchmark): Adjust.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bench.pl.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/bench.pl.in b/etc/bench.pl.in index e067d870..c65efd85 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -148,7 +148,7 @@ The C compiler. =item C<$cxx> -The C++ compiler. +The C++-11 compiler. =item C<$cflags> @@ -173,7 +173,7 @@ Verbosity level. my $bench; my $bison = $ENV{'BISON'} || '@abs_top_builddir@/tests/bison'; my $cc = $ENV{'CC'} || 'gcc'; -my $cxx = $ENV{'CXX'} || 'g++'; +my $cxx = $ENV{'CXX'} || 'g++ -std=c++11'; my $cflags = '-O2'; my @directive = (); my $gbench = 0; @@ -579,7 +579,7 @@ static void BM_${prefix} (benchmark::State& state) exit (3); } - while (state.KeepRunning()) + for (auto _ : state) { rewind (input); ${prefix}parse (); |