================
@@ -0,0 +1,67 @@
+/// Assert the fixed point precision macros according to N1169 7.18a.3 are
+/// defined when -ffixed-point is provided.
+
+// RUN: %clang_cc1 -triple=x86_64 -E -dM -ffixed-point -x c < /dev/null | 
FileCheck -match-full-lines %s
+// RUN: %clang_cc1 -triple=x86_64 -E -dM -ffixed-point -x c++ < /dev/null | 
FileCheck -match-full-lines %s
+
+/// These are the implementation-defined values for x86_64.
+// CHECK-DAG:#define __SFRACT_EPSILON__ 0.0078125hr
+// CHECK-DAG:#define __SFRACT_FBIT__ 7
+// CHECK-DAG:#define __SFRACT_MAX__ 0.9921875hr
+// CHECK-DAG:#define __SFRACT_MIN__ (-0.5hr-0.5hr)
+
+// CHECK-DAG:#define __USFRACT_EPSILON__ 0.00390625uhr
+// CHECK-DAG:#define __USFRACT_FBIT__ 8
+// CHECK-DAG:#define __USFRACT_MAX__ 0.99609375uhr
----------------
AaronBallman wrote:

I understood that they were implementation-defined, but I had missed we were 
pulling the values from `A.3`. Thanks for the explanation!

https://github.com/llvm/llvm-project/pull/81207
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to