[LLVMbugs] [Bug 19879] New: aggregate initialization uses value initialization rather than initialization from {} for subobjects with no initializer
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 28 11:19:20 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19879
Bug ID: 19879
Summary: aggregate initialization uses value initialization
rather than initialization from {} for subobjects with
no initializer
Product: clang
Version: unspecified
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 rejects this valid code:
#include <initializer_list>
struct S { S(std::initializer_list<int>); } s[1] = {};
... because we use the pre-DR1070/DR990 rule for aggregate initialization. We
should initialize s[0] from {}, which works, rather than trying to
value-initialize it (which does not work).
--
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/20140528/ea15c393/attachment.html>
More information about the llvm-bugs
mailing list