Skip to content

accepts-invalid with C++23 constexpr-unknown with struct containing reference #129845

@efriedma-quic

Description

@efriedma-quic
int &ff();
int &x = ff();
struct A { int& x; };
constexpr A g = {x};
const A* gg = &g;

Should be rejected, currently accepted. (And related variations miscompile.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepts-invalidc++23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"constexprAnything related to constant evaluation

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions