Timm =?utf-8?q?B=C3=A4der?= <tbae...@redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/77...@github.com>


================
@@ -37,6 +37,18 @@ constexpr _Complex int I2 = {};
 static_assert(__real(I2) == 0, "");
 static_assert(__imag(I2) == 0, "");
 
+constexpr int ignoredCast() {
+  I2;
+  (int)I2;
+  (float)I2;
+  D1;
+  (int)D1;
+  (double)D1;
+  return 0;
+}
+static_assert(ignoredCast() == 0, "");
+static_assert((int)I1 == 1, "");
----------------
AaronBallman wrote:

Can you also add:
```
static_assert((float)D == 1.0f, "");
```
to show that we get the correct value out of the floating complex as well?

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

Reply via email to