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

    <tr>
        <th>Summary</th>
        <td>
            [OpenMP] Compiling target offloading code with c++20 breaks due to incompatible math function definition
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            openmp,
            c++20,
            clang:headers
      </td>
    </tr>

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

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

<pre>
    Compiling C++ code with `-fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -std=c++20` can lead to errors like:

```
openmp_wrappers/complex_cmath.h:68:40: error: non-constexpr declaration of 'conj' follows constexpr declaration
```

The declaration in 
https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/openmp_wrappers/complex_cmath.h#L68
is in conflict with the definition in `<complex>`. C++20 added constexpr to this function and others. Not sure why the compiler does not complain about norm, which is above.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU82OmzAQfhpzGQU5Y0LIgUM2adRD_w69r4w9BO8aG9km2e3TV8Bm00orVZWQMYM18_n7kTGasyOq2eaBbY6ZHFPnQ_00BJ9-UdZ4_VoffD8Ya9wZDgwfGD6A8prgalIHrOSr1g_k-gFum1WS4UwpMnF0lyG9lMXKXYw2cqVGLWEVk2biqJZeyFnJQUkHlqSG5IFC8CGCNc_ExJ7xI-O3teRvz_y5THu8BjkMFCLDk_L9YOnlUfUydXnHxL6smNgXnIn90nfaOO9WyruY6GUIoElZGWQy3oFvgeFWeffEcAutt9ZfI3x49kNEy_qzo7-6GgfLjy6lIU53whPD09mkbmxy5XuGJ2svt9dqCP6JVGJ4aqxvGJ56adx0OyvdeTpkpuJnknq59b95QPGlrBYMJk54lHetNSotIqYZcGucecdbciYOb22Y-MRKnt_URw5Sa9J_8JI8pM5EaEen5hbSafCpoxBz-OYTxDEQXLvXeZSa_UQBtKcIzqe5YqVxIBs_JnA-9AwPcO2M6sDEqXyhPNO10DuxkxnV63JbFSUiVllXl5pUtVtLVGtRKdUqFMVmt91wKQpetjIzNXIUXKz5eiM4Vvl2p4pyp7ZcFCVVXLKCUy-NzScBch_OmYlxpLpcC9xmVjZk4xwRxIVthsjwwBDvNn6vzDKJfXcTCKdghXrWthnPkRXcmpjifVgyyc4R_D6Q-_qDbY5wD92SJvBta73UU-Uev_fp0ASSzxH0SJMaxk2UymQaSzCZ4C7NXehsDLb-b0_OxEwmm7n5HQAA__8WDWC4">