Skip to content

ptr & 0 not considered as constant #3119

@nunoplopes

Description

@nunoplopes
Bugzilla Link 2747
Resolution FIXED
Resolved on Mar 12, 2010 00:57
Version unspecified
OS All
CC @efriedma-quic

Extended Description

the following code is rejected by clang (with "initializer element is not a compile-time constant"):

struct sym_reg {
char nc_gpreg;
};

int sym_fw1a_scr[] = {
((int)(&((struct sym_reg *)0)->nc_gpreg)) & 0
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions