Skip to content

-preview=bitfields: Bit field address escapes through ref #20365

@dlangBugzillaToGithub

Description

@dlangBugzillaToGithub

Georgy Markov reported this on 2023-11-27T14:24:13Z

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

CC List

Description

struct S {
    ubyte _x:4, _y:4;
    ubyte* p() => &_x;   // Error: cannot take address of bit-field `_x`
    ref ubyte x() => _x; // Compiles
}

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