[cfe-dev] Try out LLVM: no C++0x & crash

Peter Collingbourne peter at pcc.me.uk
Wed Aug 24 04:29:05 PDT 2011


On Wed, Aug 24, 2011 at 08:23:44AM +0200, Matthieu Monrocq wrote:
> Hello,
> 
> Following a question about POD-ness on StackOverflow, I tried the following
> snippet on Clang via the Try Out LLVM page:
> 
> #include <type_traits>
> 
> struct B
> {
>   int a;
>   B(int aa) : a(aa) {}
>   B() = default;
> };
> 
> static_assert(std::is_pod<B>::value, "B should be POD");
> 
> 2 problems arose:
> 
> 1. Clang does not use C++0x, and there is no option to make it so, thus the
> header cannot be parsed
> 2. It caused a crash (probably because the header could not be parsed)
> 
...
> 0.	Program arguments: /opt/clang-releases/llvm-2.7/bin/clang -cc1

This would seem to imply that the version of Clang running on the
demo page is 2.7, which had quite poor C++ support.  This was backed
up by my own experiments in which I tried to compile the following
(which fails to compile; enumerator_attributes was introduced between
2.7 and 2.9):

#if !__has_feature(enumerator_attributes)
test
#endif

Are we really running 2.7?  And if so, we should certainly consider
upgrading LLVM/Clang on the demo machine.

Thanks,
-- 
Peter



More information about the cfe-dev mailing list