[llvm-bugs] [Bug 42060] New: Placement new operator in OpenCL C++
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 29 07:40:37 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42060
Bug ID: 42060
Summary: Placement new operator in OpenCL C++
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangbugs at nondot.org
Reporter: drohr at jwdt.org
CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org
Using a placement new operator yields an error "'default new' is not supported
in OpenCL C++". I see the problem for "new" and for "operator new", but
placement new should simply call the constructor upon the memory that already
exists. So I think this should be allowed. Test case:
class foo
{
int a = 0;
int b = 0;
};
__kernel void test()
{
foo x;
new(&x) foo;
}
--
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/20190529/7c617f4b/attachment.html>
More information about the llvm-bugs
mailing list