[PATCH v1 0/1] libgccjit: Add support for packed struct

Drea Pinski via Sourceware Forge forge-bot+pinskia@forge-stage.sourceware.org
Fri May 22 14:49:25 GMT 2026


Drea Pinski (pinskia) <pinskia@gcc.gnu.org>) commented on the code:


> +++ gcc/jit/docs/topics/types.rst
> @@ -558,0 +572,4 @@
> +      .. macro:: GCC_JIT_TYPE_ATTRIBUTE_PACKED
> +
> +         Packed structures or union have each of its members placed to
> +         minimize the memory required.
This definition of the packed attribute is incorrect. Rather it does not describe the reality of things. Because to me it says the order of the fields could be reorded. 
And if anything should point to the GCC documentation on the attribute:
https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-packed-type-attribute .


> +++ gcc/jit/docs/topics/types.rst
> @@ -558,0 +572,4 @@
> +      .. macro:: GCC_JIT_TYPE_ATTRIBUTE_PACKED
> +
> +         Packed structures or union have each of its members placed to
> +         minimize the memory required.
The sentence I wrote here was actually a shortened version of the first sentence of the doc you linked…
I can link to the doc, though.


--
https://forge.sourceware.org/gcc/gcc-TEST/pulls/111#issuecomment-3167


More information about the Jit mailing list