hubert.reinterpretcast added inline comments.
================
Comment at: lib/Frontend/InitPreprocessor.cpp:817
DefineFloatMacros(Builder, "LDBL", &TI.getLongDoubleFormat(), "L");
+ DefineFloatMacros(Builder, "FLT128", &TI.getFloat128Format(), "Q");
+
----------------
GCC //does// define these macros under with C++ mode when it would for the C
mode, but with the `F128` suffix (that it then interprets as a user-defined
literal suffix). Use of these macros under C++ mode would behave differently
between GCC and Clang until `Q` is replaced with `F128`.
In my experience, GCC on //does not// define these macros on platforms where
`__float128` is unsupported. This includes `powerpc64le-linux-gnu` without the
`-mfloat128` option.
================
Comment at: test/Sema/_Float128.c:2
+// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -verify %s
+// RUN: %clang_cc1 -triple powerpc64-linux -verify %s
----------------
Duplicate run line
================
Comment at: test/Sema/_Float128.c:17
+#else
+_Float128 f; // expected-error {{__float128 is not supported on this target}}
+int g(int x, _Float128 *y) { // expected-error {{__float128 is not supported
on this target}}
----------------
Add test that `__FLT128_EPSILON__` is not defined?
Repository:
rL LLVM
https://reviews.llvm.org/D40673
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits