Skip to content

field-init of bitfields gives false 'duplicate initialization' error #265

Open
@bvdberg

Description

@bvdberg
type Foo struct {
    u32 a : 1;
    u32 b : 3;
}

Foo f1 = { 1, 2 }      // ok
Foo f2 = { .a=1, .b=2 } // gives error: duplicate initialization of field 'b'

Needs to be fixed in StructFieldInitChecker

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions