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

    <tr>
        <th>Summary</th>
        <td>
            Clang 15 is unable to compile GCC's <cmath> after preprocessing it
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Platform: Arch Linux x64 (GCC 11 / Clang 15 git)

Given:

test.cpp:
```
#include <cmath>
```

Then:

```
# OK: 
$ clang++ -c test.cpp

# Fails:
$ clang++ -E -P test.cpp  > preproc.cpp
$ clang++ -c preproc.cpp 

preproc.cpp:46:12: warning: keyword '__is_void' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
    struct __is_void
           ^
preproc.cpp:184:12: warning: keyword '__is_pointer' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
    struct __is_pointer
           ^
preproc.cpp:196:12: warning: keyword '__is_arithmetic' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
    struct __is_arithmetic
           ^
preproc.cpp:200:12: warning: keyword '__is_scalar' will be made available as an identifier for the remainder of the translation unit [-Wkeyword-compat]
    struct __is_scalar
           ^
preproc.cpp:2057:3: error: constexpr function never produces a constant expression [-Winvalid-constexpr]
  acos(float __x)
  ^
preproc.cpp:2058:12: note: subexpression not valid in a constant expression
  { return __builtin_acosf(__x); }
           ^
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzNlcFuozAQhp8GLqNEYCAhBw5JmvSwK20PK-0xMmYI7jo2sk2Svv0OJE1R213l1kUIBuOZ-f4ZsEtTvRRPivva2EOQLGFpRQPfpe7OcJ6lELD8cb2GOCZrC2vF9R7iDPbSB2wRRA9BtLxcH-URNQUYj3l0fira9m14Fl3PyyNLpBaqqxCCZC0O3DdBsvl86nD92XzI8TEk_PjWC3l9TkH01AFb0QkTATeqcRRy23Kp3Fv0944bmDzdfIGAN9BabK0Ro2Afs43mwDjj2DdZpjO6xKznPnGrJUUg8ze-nIytqPTz3U663dHIimw4SaWgRDhwqhw_EjcvFVkOuAZZofaylmiBegq-QbB44FJXNGLqYcBbrh01XRoNnZYegmw1-XVNNxHm0HIfZA8XUqDDedsJD28UtzfXI8g2n-mK8_QeYa2R2qP9em2vIPfKW9zVN26lbw7opfh6hSOWO0WyKLpHpBNc8f-ghVeOu8Vlc7olvSK01tjeEEY7j-eWEDstBgyNR-Ijx6oTSEIuc7j20M9D5_pJA6bUR65kj3kNMiLlwjhaUWtleE97vq2h_-LLb9XXxmN_d105ykqjMKQEqT8Hu-WYr6jYvrOakpedVF7qXc9UE9QVJ1nRtIe_l-_dehtWRVItkgUPvfQKi9sOIR21bui7N9C3TJJJWwl9IG682gOv_VDZQXXPS_7Sh51VReN9O6zIbEsn7TlNV04pFj0odXy9TcjxGQVtSFvpXIdU4W2WJlkcNkXCsc5jnmcinWViEWeY5dVM5ILhfBaxNKRPE5UrqHMBYxpPMIQgm7oWyoJFjEVJzOIkS6JsmuQZq2ZzrOt5XKaLLEij_ttV055jauw-tMWAVHZ7Ry-VdN69veSkbq8Rh3QUn3e-MbZ4FqjQ0h8RDsmLAf4PLjNaEQ">