https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67047
--- Comment #5 from Anders Granlund <anders.granlund.0 at gmail dot com> --- (In reply to Jonathan Wakely from comment #4) > Yes you can verify that with > > static_assert( std::is_same<std::underlying_type<decltype(x)>::type, > unsigned __int128>::value, ""); > > I suppose there should be a diagnostic with -Wpedantic (Clang has a > -Wenum-too-large warning). Nice use of type traits there for the confirmation. Yes, a -Wpedantic warning is what we want here. I haven't tried this with the c compiler (the online compiler i'm using does not support c mode), but this bug may exists there also.