<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 - defaulted operator<=> triggers -Wzero-as-null-pointer-constant"
   href="https://bugs.llvm.org/show_bug.cgi?id=48281">48281</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>defaulted operator<=> triggers -Wzero-as-null-pointer-constant
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++2a
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Georg.schwab@emocean.io
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24201" name="attach_24201" title="Compile using "clang++ -std=c++20"">attachment 24201</a> <a href="attachment.cgi?id=24201&action=edit" title="Compile using "clang++ -std=c++20"">[details]</a></span>
Compile using "clang++ -std=c++20"

Comparing two objects of a class or strut using <, >, <=, or >= results in the
warning "zero as null pointer constant" if the class has a defaulted
operator<=> (either friend or member).

To reproduce, compile the attached file with "clang++ -std=c++20"

Tested on Ubuntu 20.04 on WSL, using clang-11 package from
<a href="http://apt.llvm.org/focal/">http://apt.llvm.org/focal/</a>:

<span class="quote">> clang++ -version</span >
Ubuntu clang version
11.0.1-++20201121072613+973b95e0a84-1~exp1~20201121063226.132
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin</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>