Bitfield subtlety

Torbjörn Granlund tg at gmplib.org
Wed Mar 28 11:01:06 UTC 2018


Richard Biener <rguenther at suse.de> writes:

  I would also suggest that.  Simply hide it behind some nice macros
  (ugh..).  Note I'd use two uint32_t fields because otherwise you
  may end up breaking the ABI via increased alignment requirement
  of uint64_t for the struct.

That's worth considering, thanks!

(The idea is that this abuse of the_mp_size and _mp_alloc fields only
happen when we also have a alignment greedy 64-bit pointer next to it in
the struct.  In other cases, the current plain 32-bit fields have more
than sufficient ranges.)

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list