[clang] [C23] Select the correct promoted type for a bit-field (PR #89254)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 19 06:09:30 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;
----------------
erichkeane wrote:
Wouldn't mind a 31 and a 33 as well.
https://github.com/llvm/llvm-project/pull/89254
More information about the cfe-commits
mailing list