C11 and C++11 support detection fails with clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Testing autoconf git master with the clang compiler shows the following
unfortunate feature test results:

  checking for clang-3.8 option to enable C11 features... unsupported
  checking for clang-3.8 option to enable C99 features... none needed
  […]
  checking for clang-3.8 option to enable C++11 features... unsupported
  checking for clang-3.8 option to enable C++98 features... none needed

The attached patch fixes the error in _AC_CXX_CXX11_TEST_BODY
(initializing a char* with a string constant is a warning in gcc but an
error in clang). Look OK?

The C11 feature tests fail with the following:

  conftest.c:191:19: error: static_assert expression is not an integral constant expression
    _Static_assert (&v1.i == &v1.w.k, "Anonymous union alignment botch");

This seems like a valid diagnostic if I'm reading the standard right,
even though gcc permits it. I'm not sure what can replace it, but simply
removing the assertion allows the rest of the test to pass. Any other
ideas?

Thanks,

-- 
mike

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux