<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 - Clang crashes if __private_extern__ is undef'd and used in C++"
   href="https://bugs.llvm.org/show_bug.cgi?id=43628">43628</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang crashes if __private_extern__ is undef'd and used in C++
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Compile this C++ code:

#undef __private_extern__
struct ABC {
  static double a;
};
__private_extern__ double ABC::a = 1.0;

This crashes at SemaDecl.cpp:6649 saying:

$ clang -c t.cpp
C storage class in c++!
UNREACHABLE executed at C:\src\llvm-project\clang\lib\Sema\SemaDecl.cpp:6649!

See also <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - __private_extern__ should not be recognized on non-Darwin platforms"
   href="show_bug.cgi?id=9375">https://bugs.llvm.org/show_bug.cgi?id=9375</a>, where I guess a user
wanted us to restrict this extension to MachO platforms.

Noticed while working on <a href="https://reviews.llvm.org/D68055">https://reviews.llvm.org/D68055</a>.</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>