Skip to content

Commit d2f6846

Browse files
committed
[C99] Update status of DR290, which we do not yet implement
1 parent 7269570 commit d2f6846

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

clang/test/C/drs/dr290.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
2+
*/
3+
4+
/* WG14 DR290: no
5+
* FLT_EVAL_METHOD and extra precision and/or range
6+
*
7+
* We retain an implicit conversion based on the float eval method being used
8+
* instead of dropping it due to the explicit cast. See GH86304 and C23 6.5.5p7.
9+
*/
10+
11+
#pragma clang fp eval_method(double)
12+
_Static_assert((float)(123.0F * 2.0F) == (float)246.0F, "");
13+
14+
// CHECK: StaticAssertDecl
15+
// CHECK-NEXT: ImplicitCastExpr {{.*}} '_Bool' <IntegralToBoolean>
16+
// CHECK-NEXT: BinaryOperator {{.*}} 'int' '=='
17+
// NB: the following implicit cast is incorrect.
18+
// CHECK-NEXT: ImplicitCastExpr {{.*}} 'double' <FloatingCast> FPEvalMethod=1
19+
// CHECK-NEXT: CStyleCastExpr {{.*}} 'float' <FloatingCast> FPEvalMethod=1
20+

clang/www/c_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ <h2 id="cdr">C defect report implementation status</h2>
16861686
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_290.htm">290</a></td>
16871687
<td>C99</td>
16881688
<td>FLT_EVAL_METHOD and extra precision and/or range</td>
1689-
<td class="unknown" align="center">Unknown</td>
1689+
<td class="none" align="center">No</td>
16901690
</tr>
16911691
<tr id="291">
16921692
<td><a href="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_291.htm">291</a></td>

0 commit comments

Comments
 (0)