[Issue 24538] New: ImportC: packed bitfields not implemented
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 6 07:13:24 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24538
Issue ID: 24538
Summary: ImportC: packed bitfields not implemented
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: bugzilla at digitalmars.com
>From Timon Gehr:
```
#include <stdio.h>
struct __attribute__((packed)) S{
long long x:8;
};
int main(){
printf("%ld\n",sizeof(long long)); // 8
printf("%ld\n",sizeof(struct S)); // 1
}
```
gcc gives 8 and 1, dmd gives 8 and 8.
--
More information about the Digitalmars-d-bugs
mailing list