Author: Aaron Ballman Date: 2024-04-09T13:57:36-04:00 New Revision: f48895a8be517be058153385438ad64fa09d4883
URL: https://github.com/llvm/llvm-project/commit/f48895a8be517be058153385438ad64fa09d4883 DIFF: https://github.com/llvm/llvm-project/commit/f48895a8be517be058153385438ad64fa09d4883.diff LOG: [C11] Claim conformance to WG14 N1514 This paper made Annex G a normative, but conditionally supported, annex. Clang does not implement Annex G, so we conform to this paper. Added: clang/test/C/C11/n1514.c Modified: clang/www/c_status.html Removed: ################################################################################ diff --git a/clang/test/C/C11/n1514.c b/clang/test/C/C11/n1514.c new file mode 100644 index 00000000000000..c4c3c1cb86a106 --- /dev/null +++ b/clang/test/C/C11/n1514.c @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -verify -std=c11 %s +// expected-no-diagnostics + +/* WG14 N1514: Yes + * Conditional normative status for Annex G + */ + +// We don't support Annex G (which introduces imaginary types), but support for +// this annex is conditional in C11. So we can test for conformance to this +// paper by ensuring we don't define the macro claiming we support Annex G. + +#ifdef __STDC_IEC_559_COMPLEX__ +#error "when did this happen??" +#endif diff --git a/clang/www/c_status.html b/clang/www/c_status.html index 7ee1d2b507e88c..411f55447be778 100644 --- a/clang/www/c_status.html +++ b/clang/www/c_status.html @@ -568,7 +568,7 @@ <h2 id="c11">C11 implementation status</h2> <tr> <td>Conditional normative status for Annex G</td> <td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1514.pdf">N1514</a></td> - <td class="unknown" align="center">Unknown</td> + <td class="full" align="center">Yes <a href="#annex-g">(1)</a></td> </tr> <tr> <td>Creation of complex value</td> @@ -606,6 +606,9 @@ <h2 id="c11">C11 implementation status</h2> <td class="unknown" align="center">Unknown</td> </tr> </table> +<span id="annex-g">(1): Clang does not implement Annex G, so our conditional support +conforms by not defining the <code>__STDC_IEC_559_COMPLEX__</code> macro. +</span> </details> <h2 id="c17">C17 implementation status</h2> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits