[LLVMbugs] [Bug 16972] New: accepts-invalid if member is uninitialized when a trivial constexpr copy constructor is called
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 22 13:13:49 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16972
Bug ID: 16972
Summary: accepts-invalid if member is uninitialized when a
trivial constexpr copy constructor is called
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang accepts this:
struct S {
constexpr S() : n(f(*this)) {}
int n;
static constexpr int f(S s) { return 0; }
};
void f() { constexpr S s; }
It should not: S's implicit copy constructor reads s.n while it is
uninitialized.
--
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/20130822/8a7c3ee6/attachment.html>
More information about the llvm-bugs
mailing list