[clang] [C23] Select the correct promoted type for a bit-field (PR #89254)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 19 06:21:33 PDT 2024
================
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s
+
+// GH87641 noticed that integer promotion of a bit-field of bit-precise integer
+// type was promoting to int rather than the type of the bit-field.
+struct S {
+ unsigned _BitInt(7) x : 2;
+ unsigned _BitInt(2) y : 2;
+ unsigned _BitInt(72) z : 28;
----------------
AaronBallman wrote:
Sure, I can add some signed tests with different boundaries!
https://github.com/llvm/llvm-project/pull/89254
More information about the cfe-commits
mailing list