[LLVMbugs] [Bug 17766] New: Problem compiling simple application when using C++11 and -fdelayed-template-parsing
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Nov 1 08:30:59 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17766
Bug ID: 17766
Summary: Problem compiling simple application when using C++11
and -fdelayed-template-parsing
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: jwillemsen at remedy.nl
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Testing on Fedora 19 using clang version 3.3 (tags/RELEASE_33/rc3). We have
some dependencies on another library that needs -fdelayed-template-parsing
which compiles, but we also are using C++11, which leads to some problems. When
we compile the program
#include <algorithm>
int main(int, char**)
{
return 0;
}
It compiles without problems when using
clang++ -fdelayed-template-parsing t.cpp
also no problems when we use
clang++ -std=c++11 t.cpp
But when we combine them to
clang++ -std=c++11 -fdelayed-template-parsing t.cpp
We get a lot of errors as below. Combining both options leads to problems with
3.3
[build at fc19jslave05 ~]$ clang++ -std=c++11 -fdelayed-template-parsing t.cpp
In file included from t.cpp:1:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/algorithm:62:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_algo.h:62:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_tempbuf.h:60:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/stl_construct.h:61:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/ext/alloc_traits.h:36:
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:57:35:
error: in-class
initializer for static data member is not a constant expression
static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:64:19:
note: in
instantiation of template class
'std::__alloctr_rebind_helper<std::allocator<double>, double>' requested
here
bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
^
/usr/lib/gcc/x86_64-redhat-linux/4.8.1/../../../../include/c++/4.8.1/bits/alloc_traits.h:202:9:
note: in
instantiation of default argument for
'__alloctr_rebind<std::allocator<double>, double>' required here
using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
^~~~~
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131101/59711442/attachment.html>
More information about the llvm-bugs
mailing list