diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-05-19 07:20:14 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-05-19 07:20:14 -0700 |
commit | 417e7672bcb9a9cd0dd13d10bc6df07743615a63 (patch) | |
tree | 9c24447d574b5fcf1a1b73bbec850033310b9b24 /struct.c | |
parent | c8d0b0cd48275e0e0182c0a3f6af1e020f5c7c29 (diff) | |
download | txr-417e7672bcb9a9cd0dd13d10bc6df07743615a63.tar.gz txr-417e7672bcb9a9cd0dd13d10bc6df07743615a63.tar.bz2 txr-417e7672bcb9a9cd0dd13d10bc6df07743615a63.zip |
ffi: diagnose bitfields wider than type.
* ffi.c (ffi_type_compile): Show the original bitfield syntax
in the invalid size diagnostics. In the case of the (bit n type)
syntax, restrict the maximum bits to the width of the type,
not just to 32 or 64. I realize the 8 * tft->size calculation
can overflow for huge array types, but it makes no sense to use
them as bitfields.
Diffstat (limited to 'struct.c')
0 files changed, 0 insertions, 0 deletions