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

    <tr>
        <th>Summary</th>
        <td>
            Set `__NO_TRAPPING_MATH__` When Applicable
        </td>
    </tr>

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

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

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

<pre>
    When setting [`-fno-trapping-math`](https://clang.llvm.org/docs/UsersManual.html#cmdoption-f-no-trapping-math) (note: it's the default in Clang, though not in GCC), this should be detectable with a macro. GCC [defines](https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html) `__NO_TRAPPING_MATH__`, so I suggest that be defined here too.

(Note: this change is related to and inspired by [`-fno-math-errno`](https://clang.llvm.org/docs/UsersManual.html#cmdoption-f-no-math-errno), for which both compilers define `__NO_MATH_ERRNO__`.)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysk89vvDYQxf8acxmBvGaXHwcO2003zSGbKE3V48rYA3ZlbGQPjfLfV7CrNGqrnr4XkAzzPJ_3ZmRKdvSIHTv8xA4PmVzIhNiNGCakaKXP-qA_u98NekhIZP0I668Vzwcfcopynq0f80mSYRVnhwcmGkM0J1YemTgzcVZO-rFw7s-pCHFk4qyDSkycf0sY07P0i3SFockxUapJh5ls8PmQ_0tdtMBE4wMhK49giYk6ARkEjYNcHIH1cFrvYuIEZMIyGvBhO348nZhob-c2QTJhcRr6tZRQkewdwoclAxImqWIo1oqVU-NgPab_whqVKka_3JmCd9bjnUzNMxPnU5im4PPXiDcVnT-v2ukO2wKr-PV6ebm-vx1fX58uj9fn4_sv1-tqozhBCvAEaRlHTARkJN363ZTAYESgEArGHxg_3p-iudzd2TCVkX5EsAkiOkmogQJIr8H6NNuIGvrP72GuLucYow8_PMlv0rcchhDhw1hloA9kQIVptg5juhN-ebNZ8vPb2-VlM6Zgos10V-q2bGWG3a7mh4PgTV1mpquU7hWve17zfd_2KJtD34iK73TfVCWKzHaCiz3f7epdu68PZcERh0FUw15rPdTVju05TtK6L8bMprRgVzf7tsqc7NGlbVOE8PgB20cmxLo4sVtr8n4ZE9tzZxOlv1XIksPuV6T_yRy2HTvOs7NqHchsia77x8hZMktfqDAxcV7F7698juEPVMTEeWtpzWRr-a8AAAD__1htQDQ">