Skip to content

Note Clang compiler bug seemingly unique to Glaze somewhere #2234

@ivanka2012

Description

@ivanka2012

See the following:
llvm/llvm-project#134148

I have an unproven feeling that it's responsible for a weird bug that I could only reproduce on a specific version of Clang 21.

I have this program: https://gcc.godbolt.org/z/oeKbvWT99. On Compiler Explorer it will compile with incomplete type errors, and as far as I'm concerned that's fine.

However, if you compile it with the Clang from llvm-mingw's llvm-mingw-20251216-ucrt-x86_64.zip on Windows 10, for the last two lines it will say static assertion failed due to requirement 'glz::reflect<ExpUnary>::size == 2' because the expression evaluates to '0 == 2'. It won't complain about incomplete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler bugNot a Glaze bug, but a compiler bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions