[Issue 22315] New: ImportC: #pragma pack is not implemented
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 18 08:10:41 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22315
Issue ID: 22315
Summary: ImportC: #pragma pack is not implemented
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dave287091 at gmail.com
I believe Walter has said that he doesn’t intend to support #pragma pack, but I
have discovered some macOS system headers that use the feature. At least,
fcntl.h and sys/event.h use the feature in defining some structures.
An example from event.h:
#pragma pack(4)
struct kevent {
uintptr_t ident; /* identifier for this event */
int16_t filter; /* filter for event */
uint16_t flags; /* general flags */
uint32_t fflags; /* filter-specific flags */
intptr_t data; /* filter-specific data */
void *udata; /* opaque user data identifier */
};
#pragma pack()
(I have no idea why pragma pack is even used here, the structure has no
padding).
I haven’t studied the headers closely enough to see if ignoring it matters or
not.
--
More information about the Digitalmars-d-bugs
mailing list