mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
@@ -565,9 +565,15 @@ main (int argc, char const* argv[])
|
||||
|
||||
m4_define([AT_FOR_EACH_CXX],
|
||||
[[at_for_each_cxx_CXXFLAGS_save=$CXXFLAGS
|
||||
for at_cxx_std in "" $STDCXX_FLAGS
|
||||
for at_cxx_std in '' \
|
||||
${CXX98_CXXFLAGS:+"$CXX98_CXXFLAGS"} \
|
||||
${CXX03_CXXFLAGS:+"$CXX03_CXXFLAGS"} \
|
||||
${CXX11_CXXFLAGS:+"$CXX11_CXXFLAGS"} \
|
||||
${CXX14_CXXFLAGS:+"$CXX14_CXXFLAGS"} \
|
||||
${CXX17_CXXFLAGS:+"$CXX17_CXXFLAGS"} \
|
||||
${CXX2A_CXXFLAGS:+"$CXX2A_CXXFLAGS"}
|
||||
do
|
||||
]AS_ECHO(["Testing with C++ standard flags: '$at_cxx_std'"])[
|
||||
]AS_ECHO(["======== Testing with C++ standard flags: '$at_cxx_std'"])[
|
||||
CXXFLAGS="$at_for_each_cxx_CXXFLAGS_save $at_cxx_std"
|
||||
]$1[
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user