Hi.

avr-gcc implements a 24-bit scalar integer types __int24 and __uint24 in
avr.c:TARGET_INIT_BUILTINS like so:

  tree int24_type  = make_signed_type (GET_MODE_BITSIZE (PSImode));
  tree uint24_type = make_unsigned_type (GET_MODE_BITSIZE (PSImode));

  (*lang_hooks.types.register_builtin_type) (int24_type, "__int24");
  (*lang_hooks.types.register_builtin_type) (uint24_type, "__uint24");

PSImode is defined in avr-modes.c:

FRACTIONAL_INT_MODE (PSI, 24, 3);

Is this the right definition of a built-in type?

The question is because __int24 shreds the compiler, see PR51527

So the question is if there is something missing or broken in the definition
above or if it's actually a flaw in the front-end.

For the __int128 there is much more code sprinkled over the compiler sources,
so maybe it's not that easy to introduce a new, built-in type completely in the
back-end?

Thanks.

Reply via email to