[fpc-pascal] alignment of types ( __alignof__ in fpc)

Dmitry Boyarintsev skalogryz.lists at gmail.com
Thu Jan 12 05:24:58 CET 2017


Hello,

Porting some C-headers. Ran, into a declaration:

#define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *))

_alignof_ seems to be a compiler attribute
https://gcc.gnu.org/onlinedocs/gcc/Alignment.html

Is there anything similar available fpc?

Delphi doesn't seem to have any
http://stackoverflow.com/questions/30454118/how-to-translate-alignof-to-delphi

GNU Pascal seems to have.
http://www.gnu-pascal.de/gpc/AlignOf.html

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170111/fd89d460/attachment.html>


More information about the fpc-pascal mailing list