Hi all, Earlier today I decided to clone the GCC repo and build the latest code just to play around with some new C23 features. One thing I attempted was the following:
typedef _BitInt(128) underlying; enum my_enum : underlying { FOO = (underlying)1 << 100; BAR = (underlying)1 << 101; }; I expected this to work — it builds on Clang too — but it failed to compile with the error ‘invalid underlying type’ (or something like that; I’m going off of memory). I took a look into the C23 working draft and I see no reference to bit-precise integers being disallowed as an underlying type to an enumeration. As a result I assume this is a bug in GCC so I’m reporting it here just in case. If it’s not a bug, do let me know why that is the case. -- — Thomas