<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - static constexpr class members not accepted without address space qualifier"
   href="https://bugs.llvm.org/show_bug.cgi?id=41609">41609</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>static constexpr class members not accepted without address space qualifier
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>OpenCL
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>drohr@jwdt.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21824" name="attach_21824" title="Demonstator for problem">attachment 21824</a> <a href="attachment.cgi?id=21824&action=edit" title="Demonstator for problem">[details]</a></span>
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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>