On Thu, Dec 21, 2023, at 1:32 PM, Sevan Janiyan wrote: > Intel laptop running 10.10.5, m4 included with OS is too old > (1.4.6), so GNU m4 1.4.18 was used. ... > ERROR: 549 tests were run, > 6 failed (4 expected failures). > 60 tests were skipped.
(ignoring test #11, as that's a known issue) ... > 332: acc.at:20 AC_PROG_CC_C_O ... > > configure:2575: checking for C compiler version > > configure:2584: gcc --version >&5 > > Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) > > Target: x86_64-apple-darwin13.4.0 ... > > configure:3008: gcc -std=gnu11 -c -g -O2 conftest.c >&5 > > configure:3008: $? = 0 > > configure:3030: result: -std=gnu11 > > configure:3146: checking whether gcc -std=gnu11 and cc understand -c and > -o together > > configure:3178: gcc -std=gnu11 -c conftest.cpp -o conftest2.o >&5 > > error: invalid argument '-std=gnu11' not allowed with 'C++/ObjC++' Congratulations, you found a bug in Autoconf proper, not just in the testsuite! AC_PROG_CC_C_O is specifically a test of the C compiler. There's another macro AC_PROG_CXX_C_O that does the same test on the C++ compiler (and two more for Fortran compilers). They should all be either refusing to execute under the wrong AC_LANG setting, or ignoring the AC_LANG setting; not invoking the C compiler, using C-specific options, on a C++ source file. As these macros are testing for a feature that's missing only from very old compilers (from the mid-1990s at the latest), as the thing the testsuite does to trigger the bug is somewhat bizarre compared to what any real configure.ac is likely to be doing, and as the above misuse of the C++ compiler is harmless with *most* versions of GCC and Clang, I'm going to leave everything as is for release 2.72. I filed https://savannah.gnu.org/support/index.php?110987 so we don't forget about it. zw