Skip to content

Clang incorrectly takes an unnamed bitfield as a member #10661

@RealLitb

Description

@RealLitb
mannequin
Bugzilla Link 10289
Resolution FIXED
Resolved on Oct 10, 2011 12:22
Version trunk
OS Linux
CC @DougGregor

Extended Description

The following is valid C++03 code, as far as I can see

struct A {
private:
int : 0;
};

A a = { };

"A" is an aggregate, but clang complains

main1.cpp:6:3: error: non-aggregate type 'A' cannot be initialized with an initializer list
A a = { };

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions