[llvm-bugs] [Bug 41609] New: static constexpr class members not accepted without address space qualifier
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 26 00:40:28 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41609
Bug ID: 41609
Summary: static constexpr class members not accepted without
address space qualifier
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
Created attachment 21824
--> https://bugs.llvm.org/attachment.cgi?id=21824&action=edit
Demonstator for problem
I can create constexpr constants without an address space qualifier, but if I
try to create a static constexpr class members (which are essentially just
constexpr constants), clang complains:
error: program scope variable must reside in global or constant address space
The attached test case demonstates the problem.
CUDA has special treatment to allow such constexpr static members. I didn't
read something in the OpenCL spec about this, but out of convenience and
compatibility, I think it should be supported as well.
--
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/20190426/65a5b73e/attachment-0001.html>
More information about the llvm-bugs
mailing list