Hi, GCC supports VLAs as structure and union members as an extension, and it appears that TinyCC supports this as well. However, sizeof() seems to do the wrong thing:
#include <stdio.h>
int main(void) {
const int k = 16;
printf("%zu\n", sizeof(struct { char b[k]; }));
}.
This prints 16 with GCC and Clang on an x86_64 Debian Bookworm machine,
but 8 under TinyCC, which obviously cannot be a legitimate size for the
structure. I don't know that there has been any particular effort in
TinyCC to support this extension or whether the presence of this
"feature" is merely incidental, but I wonder if this bug would be
feasible to fix?
I for one think this extension has good use cases (especially with
unions) which I shall not elaborate on here, and would like to see
TinyCC continue to support it.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
