[C99] Update status of DR290, which we do not yet implement

This commit is contained in:
Aaron Ballman 2024-03-22 12:48:25 -04:00
parent 7269570e4b
commit d2f684685a
2 changed files with 21 additions and 1 deletions

20
clang/test/C/drs/dr290.c Normal file
View File

@ -0,0 +1,20 @@
/* RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
*/
/* WG14 DR290: no
* FLT_EVAL_METHOD and extra precision and/or range
*
* We retain an implicit conversion based on the float eval method being used
* instead of dropping it due to the explicit cast. See GH86304 and C23 6.5.5p7.
*/
#pragma clang fp eval_method(double)
_Static_assert((float)(123.0F * 2.0F) == (float)246.0F, "");
// CHECK: StaticAssertDecl
// CHECK-NEXT: ImplicitCastExpr {{.*}} '_Bool' <IntegralToBoolean>
// CHECK-NEXT: BinaryOperator {{.*}} 'int' '=='
// NB: the following implicit cast is incorrect.
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double' <FloatingCast> FPEvalMethod=1
// CHECK-NEXT: CStyleCastExpr {{.*}} 'float' <FloatingCast> FPEvalMethod=1

View File

@ -1686,7 +1686,7 @@ conformance.</p>
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_290.htm">290</a></td>
<td>C99</td>
<td>FLT_EVAL_METHOD and extra precision and/or range</td>
<td class="unknown" align="center">Unknown</td>
<td class="none" align="center">No</td>
</tr>
<tr id="291">
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_291.htm">291</a></td>