https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113887

--- Comment #7 from Jens Gustedt <jens.gustedt at inria dot fr> ---
(In reply to Joseph S. Myers from comment #5)
> ... including __INT128_C and __UINT128_C
> defined to use an appropriate constant suffix.

You don't need a specific suffix for these types if you have `_BitInt(128)`,
there is no need to invest thoughts or development time in this.
Something like

#define INT128_C(N) ((__int128)+ N ## W)

would do. If 128 is more than `INTMAX_WIDTH` the resulting constants are
exempted by C23 of being suitable for preprocessor arithmetic. But if it is
indeed 128, the expression still is an integer constant expression, even in the
preprocessor.

With that observation you easily also create `MIN` and `MAX` macros

#define INT128_MAX (INT128_C(1) << 126)
#define INT128_MIN (-INT128_MAX - 1)

Reply via email to