autoconf
[Top][All Lists]
Advanced

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

C11 and C++11 support detection fails with clang


From: Mike Miller
Subject: C11 and C++11 support detection fails with clang
Date: Tue, 23 Feb 2016 23:18:06 -0800
User-agent: Mutt/1.5.24 (2015-08-30)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]