D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 21634 - std.bitmanip: bitfields may generate invalid variable
Summary: std.bitmanip: bitfields may generate invalid variable
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-02-13 08:51 UTC by Berni44
Modified: 2021-02-22 20:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Berni44 2021-02-13 08:51:54 UTC
unittest
{
    struct A
    {
        mixin(bitfields!(
                         int, "", 1,
                         int, "LINE", 3,
                         int, "", 1,
                         int, "", 3));
    }
}

Should compile, but produces a variable called "__LINE__".
Comment 1 Dlang Bot 2021-02-16 10:29:47 UTC
@berni44 created dlang/phobos pull request #7799 "Fix 21634 - std.bitmanip: bitfields may generate invalid variable" fixing this issue:

- Fix 21634 - std.bitmanip: bitfields may generate invalid variable

https://github.com/dlang/phobos/pull/7799
Comment 2 Dlang Bot 2021-02-22 20:02:42 UTC
dlang/phobos pull request #7799 "Fix 21634 - std.bitmanip: bitfields may generate invalid variable" was merged into master:

- 88496f733a956d9e6536069d2bde0eef9c226267 by berni44:
  Fix 21634 - std.bitmanip: bitfields may generate invalid variable

https://github.com/dlang/phobos/pull/7799