This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Additional members are permitted, and the fields can be order. In order to create a portable Ada interface, I have to write a short C program which uses sizeof and offsetof to extract the structure layout. In theory, it is possible to create compile-time-only tests suitable for cross-compilation (compile-time constant expressions, invalid zero-length arrays, and a binary search), but this is rather messy.
GCC_COMPUTE_MEMBERS_SIZE_OFFSET([#include <poll.h>], [struct pollfd], [fd events revents]).
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |