Skip to content

ImportC: packed bitfields not implemented #18238

@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Walter Bright (@WalterBright) reported this on 2024-05-06T07:13:24Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=24538

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions