<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/73023>73023</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Header guard followed by `pragma once` is not obeyed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          pogo59
      </td>
    </tr>
</table>

<pre>
    https://gcc.godbolt.org/z/6cnd9qMjP courtesy of @filcab 

If a header has the usual header guard, and then `#pragma once` appears after that, neither attempt to avoid multiple inclusion will be obeyed with `-std=c++20`.  Adding `-fno-modules` doesn't help.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxcksGOnDwQhJ-mubQGmTbDDAcOs_8K_TlEyisY3IBXxiZ2s6PJ00fMbpRoL7bkVrlc9dnk7ObA3MH5Bc6vhdllianb4hzPbTFE--gWkS2DvgH1QP08juUc7RC9lDHNQP0voL4Zg21_fn_7gWPck3B-YJwQajU5P5oBQb2Cun2s3yY0uLCxnHAxGWVh3PNu_J_DeTfJAv2HJthjGhAaBaS3ZObVYAwjQ6PQbBublNFMwgllMXJoAjtZOKER4XUTlIjmPTqL6-7FbZ7RhdHv2cWAd-c9Doxx4AdbvDtZDqtTFgv6dQR6AXohBY0qEW_WujA_51OIpzXa3XM-HmIj5wB0EVzYb-VHysJ22ra6NQV31UWpc1spTcXS1VRf62Zo-aqptYOlqW4qcyWrKh6pNYXrSJGuKqqqK-lzVV50o4bLwLrSV2qnCWrFq3G-9P59PSAULuedu4tWpAtvBvb5yZNo9CbMoG9TikE4WCA6KKfukJ6Gfc5QK--y5L-XiRPP3f__sMApeh_vbHF4HAV8AeEyhiifLRZ78l-_jJNlH8oxrkD9YfO5nbYU33gUoP4ZIAP1zwy_AwAA__8519Nf">