On Mon, Jan 30, 2023 at 11:57:11PM +0200, Andy Shevchenko wrote: > On Mon, Jan 30, 2023 at 09:59:42PM +0100, Levente Révész wrote: ... > static_assert((PCA_TYPE_MASK + 1) >= (TYPE_MAX << 8)); Actually better static_assert(PCA_TYPE_MASK >= ((TYPE_MAX - 1) << 8)); to prevent potential overflow if we move this field to the end of the type. -- With Best Regards, Andy Shevchenko