File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change @@ -1686,7 +1686,7 @@ <h2 id="cdr">C defect report implementation status</h2>
1686
1686
< td > < a href ="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_290.htm "> 290</ a > </ td >
1687
1687
< td > C99</ td >
1688
1688
< 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 >
1690
1690
</ tr >
1691
1691
< tr id ="291 ">
1692
1692
< td > < a href ="https://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_291.htm "> 291</ a > </ td >
You can’t perform that action at this time.
0 commit comments