Matias Ezequiel Vara Larsen via fpc-pascal <fpc-pascal@lists.freepascal.org>
schrieb am Mi., 29. März 2023, 00:27:

> Hello,
>
> On Mon, Mar 27, 2023 at 09:35:38PM +0200, Jonas Maebe via fpc-pascal wrote:
> > On 27/03/2023 21:25, denisgolovan via fpc-pascal wrote:
> >
> > > But it's still not possible to attach alignment to type itself instead
> of variable, right?
> >
> > It is possible (
> https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/talignrec1.pp
> ),
> > but it is subject to the same limitations when declaring variables of
> those
> > types.
> >
>
> Thanks, this is what I was looking for, however, when the type is
> defined as an array, only the [0] element is aligned. I was expecting
> that each element in the array would be aligned.
>

No, array types are defined as never having padding between the elements.
You need to make sure that the element is appropriately sized then.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to