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

    <tr>
        <th>Summary</th>
        <td>
            clang should warn if fp exception functions are called without appropriate flags/pragmas
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          efriedma-quic
      </td>
    </tr>
</table>

<pre>
    We regularly get users complaining that fetestexcept()/feenableexcept()/etc. don't work properly.  We document that you need to use appropriate flags or `#pragma STDC FENV_ACCESS`.  But it's hard to find if you don't know what you're looking for.

clang should be able to detect calls to those functions and print a warning.  (This won't catch 100% of cases, but it's low-hanging fruit.)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkkk9z2yAQxT8NuuxYI68syTro4DjxsZdkmmMHwSLRYFBhietv35HjTvrnxMDA2_d-PJmSnTzRIJoH0TwWMvMc4kAmWtJnufmRrSrGoK_DK0GkKTsZ3RUmYsiJYgIVzouT1ls_Ac-SwRBTYvqpaGGBe4G9wJMh8nJ09M8xsSpBBy-wY7iE-AZLDAtFdy0BXgl0UPlMnj-UryGDJ9LAYR0OcllvRyuZwDg5JQgRRFsJrJcop7OE55fHI5yevnz9djgen56fRVuVAA-ZwbLALsEs403OWK_BmtuI337efLjA5T5YYBcJXAhva1ATYimqg6gOykk_QZpDdhpGgjXkKqiJSTEo6Vxa9zyHRGCyV2yDTyC9hiVazyDhIuOKrwQQuH-ZbYLL3YKSrGbYVpXABoIBJRMlgUcYPyO4cNnM0k83XzFbLgX2hR5q3de9LGjYdrtq2zVN3xfzMPay32PfmlrrXdt1eruvlW6oa00jO90WdsAKmwpxi1i1dV-O486YWpHZ9e3YVJXYVXSW1pXOvZ_LEKfCppRp2OIe675wciSXbnVCvNER9UFbOfmQ2KokENeexWF9vhnzlMSucjZx-hRky46Gv9CujNYPMgt8dMgG_yfOSDfWpOFieQ6Z_2-HwNNHLVKRoxtm5iWJ-iDwJPA0WZ7zWKpwFnhajdyXzRLDd1Is8HSLuarck74P-CsAAP__RYAVng">