http://llvm.org/bugs/show_bug.cgi?id=10944
Summary: Rejects-valid/potential miscompile in edge case with
templates and initializer-list
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Testcase:
struct X { int a, b; };
template<typename T> int foo(T x) {
X i[] = { 1, x, { 3, 4 } };
return sizeof(i);
}
void g() { X i = { 1, 2 }; foo(i); }
This code is valid, but clang rejects it. More complicated cases involving
conversion operators could be miscompiled.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs