Skip to content

Commit 3ce19f3

Browse files
AaronBallmanAlexisPerry
authored andcommitted
[C99] Claim partial conformance to IEC 60559 support
We intend to support Annex F but there are edge cases we don't handle properly, such as raising an "invalid" exception when converting some floating-point values to integers. This does not add any test coverage as full conformance would require sufficiently extensive testing that we should consider getting a third-party test suite such as the one from http://tybor.com/
1 parent cbb6fad commit 3ce19f3

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

clang/www/c_status.html

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,25 @@ <h2 id="c99">C99 implementation status</h2>
277277
<tr>
278278
<td>IEC 60559 support</td>
279279
<td>Unknown</td>
280-
<td class="unknown" align="center">Unknown</td>
280+
<td class="partial" align="center">
281+
<details><summary>Partial</summary>
282+
Clang supports much of the language requirements for Annex F, but
283+
full conformance is only possible to determine when considering the
284+
compiler's language support, the C runtime library's math library
285+
support, and the target system's floating-point environment support.
286+
Clang does not currently raise an "invalid" floating-point exception
287+
on certain conversions, does not raise floating-point exceptions for
288+
arithmetic constant expressions, and other corner cases. Note, Clang
289+
does not define <code>__STDC_IEC_559__</code> because the compiler
290+
does not fully conform. However, some C standard library
291+
implementations
292+
(<a href="https://sourceware.org/git/?p=glibc.git;a=blob;f=include/stdc-predef.h">
293+
glibc</a>, <a href="https://git.musl-libc.org/cgit/musl/tree/include/stdc-predef.h">
294+
musl</a> will define the macro regardless of compiler support unless
295+
the compiler defines <code>__GCC_IEC_559</code>, which Clang does not
296+
currently define.
297+
</details>
298+
</td>
281299
</tr>
282300
<tr>
283301
<td>trailing comma allowed in enum declaration</td>

0 commit comments

Comments
 (0)