[LLVMbugs] [Bug 23602] New: clang++ fails to compile libstdc++ debug/vector with -D_GLIBCXX_DEBUG -std=c++11
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 20 16:10:30 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23602
Bug ID: 23602
Summary: clang++ fails to compile libstdc++ debug/vector with
-D_GLIBCXX_DEBUG -std=c++11
Product: clang
Version: trunk
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: adam at spicenitz.org
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
clang version 3.7.0 (trunk 233105)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/5.1.1
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/5.1.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Version of libstdc++:
libstdc++-devel-5.1.1-1.fc22.x86_64
Sample code:
#include <vector>
int main() {
const std::vector<int> empty_ints;
return empty_ints.size();
}
$ clang++ -D_GLIBCXX_DEBUG -std=c++11 c.cpp
c.cpp:4:26: error: default initialization of an object of const type 'const
std::vector<int>' without a user-provided default constructor
const std::vector<int> empty_ints;
^
c.cpp:4:36: note: add an explicit initializer to initialize 'empty_ints'
const std::vector<int> empty_ints;
^
{}
1 error generated.
This error does not occur if I leave out either -D_GLIBCXX_DEBUG or -std=c++11.
This also works correctly with g++ 5.1.1.
--
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/20150520/6db807d6/attachment.html>
More information about the llvm-bugs
mailing list