add bitfields documentation#3190
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. |
|
@CyberShadow can we please have a way to find what the errors are with DAutoTest? |
|
With DautoTest (unless you have LeTeX error in which case you're screwed) scroll all the way to the bottom of of the Build Log (click view). In this case your problem is |
c4bd672 to
55a1b93
Compare
|
Oh, I clicked on "base view". No errors there. I wonder what that is. Anyhow, thanks! Hope it works now. |
|
The text mentions |
55a1b93 to
0b956a0
Compare
|
@MrSmith33 it does now! |
0b956a0 to
3dca68e
Compare
3dca68e to
ccdacb6
Compare
|
The dmd bitfields PR has been merged, under the -preview=bitfields switch. This one needs to be, too. |
OK - As soon as it mentions the preview flag I will merge it |
|
does the best practices section at line 44 still hold? |
|
DeclaratorInitializer should also get a rule with BitfieldDeclarator in the grammar. DeclaratorIdentifier is only used for declarators after the first comma, while DeclaratorInitializer is used for the first declarator. |
|
Another potential ambiguity in the grammar: The statement could be a bitfield with Edit: The text already says "Bit fields can only be fields in structs, unions and classes.", so that may be enough. |
|
@WalterBright you may want to update this part: Lines 90 to 94 in ae9d2d6 |
|
@maxhaton If bitfields are here to stay it would be good to merge this after adding any of the diff suggestions as you see fit. After that I can make a pull to fix #3190 (comment) |
ccdacb6 to
cd59a5f
Compare
|
We really shouldn't document this useless trash feature that never passed the DIP review to be added to the language. |
cfe1bf7 to
8f7a8c2
Compare
Done. |
8f7a8c2 to
83b51b3
Compare
|
Ready to merge. |
dkorpel
left a comment
There was a problem hiding this comment.
Like Adam said, this feature hasn't been added to the language. This specification text makes it sound like it is. Perhaps it can be documented on a separate page for preview switches.
|
A preview switch doesn't imply it's not part of the language, there are preview switches for current language features. |
|
Since bitfields do not influence anything else in the language semantics, there's no longer a purpose to putting bitfields behind a preview switch. |
|
As dlang/dmd#21625 was merged, it's probably time to merge this (ideally with minor fix I just commented). |
Co-authored-by: Nick Treleaven <ntrel002@gmail.com>
|
I merged the minor fix. Thank you |
Feature has since been implemented.
Implementation: dlang/dmd#13568