-
-
Notifications
You must be signed in to change notification settings - Fork 655
incorporate bitfields #21625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorporate bitfields #21625
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#21625" |
ad66da0
to
ba48575
Compare
So, we cannot pull this because of dlang/dlang.org#4276 which cannot be pulled because of this PR. How about pull this one and then the other one? |
I think we agreed in a monthly meeting that once the DIP gets accepted, the bugs should be fixed. Otherwise people start depending on broken behavior, or complain about yet another halfbaked D feature being released too early. #18247 |
Added label |
Only #18247 and maybe debug is for @WalterBright to look into. Wrt dwarf debug, bit fields typically require the use of the struct
{ align (1):
int f1 : 1;
int f2 : 32;
int f3 : 4;
int f4 : 2;
}
That should be clear enough example for anyone to have a crack at. |
#18247 has been fixed. |
#20473 is fixed I have a wip patch for the last linked issue that makes bit-fields return false from |
What's the current holdup? |
Possibly just library support. |
@ibuclaw can you please turn your code changes to writeln to a PR? |
It doesn't handle bitfields properly though - bitfields can overlap other bitfields or even regular fields - someone with a bit more familiarity with why it formats the way it does should have a look in. |
There are other issues with the formatter which has nothing to do with bitfields, but is adjacent to supporting wrt determining offsets and overlaps within a struct. dlang/phobos#10844 It would be best to put format support on the back burner. FYI @dkorpel |
Need to update allInst(),
- bitfields(),
+ bitfields(true),
cplusplus((CppStdRevision)201103u),
help(),
v(), lets discuss this at dconf |
ba48575
to
2bcb8ae
Compare
With the merging of dlang/phobos#10851 this is ready to pull. |
Still dealing with support for packed and bitfields. The tl;dr of that is alignment is a bit of a mess, there's one AlignDeclaration node, but at least three different semantics and interactions with the packed attribute/declspec. |
The current bitfield implementation does not support the "packed" gcc and vc semantics, where the bitfield can straddle two memory units. The behavior of it is different between gcc and vc. I view this as a niche extension, and should not impair pulling this PR. |
@ibuclaw I am looking forward to your PR on packed bitfields! Thank you! |
No description provided.