[clang] [clang] Fixed inconsistent diagnostics when initializing a constexpr variable with a compound literal (PR #232825)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 07:55:08 PDT 2026


tbaederr wrote:

But what's the reason for the initialize being rejected? I assume it's simply not allowed to read from a non-constexpr variable in C23 if we're in a constant context (e.g. initializing a constexpr variable)? In that case, shouldn't the evaluation of the initializer fail?

https://github.com/llvm/llvm-project/pull/232825


More information about the cfe-commits mailing list