Closed cbecerescu closed 4 years ago
The following C struct declaration
struct Bad { int a : 1; int b : 1; struct C *ptr; // C is undeclared }
would be translated in D to
struct Bad { import std.bitmanip: bitfields; align(4); mixin(bitfields!( int, "a", 1, int, "b", 1, uint, "_padding_0", 6 )); uint, "_padding_1", 8 )); C* ptr; }
The issue is that the bitfields final padding would be added twice:
This issue doesn't occur when C is a pre-declared struct, as we will only have a FieldDecl for that line.
The following C struct declaration
would be translated in D to
The issue is that the bitfields final padding would be added twice:
This issue doesn't occur when C is a pre-declared struct, as we will only have a FieldDecl for that line.