[clang] [clang][CodeGen] Use dynamic init for vague-linkage variables without constant initialization (PR #226645)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 17 13:10:19 PDT 2026
efriedma-quic wrote:
Currently we have two essentially two forms of "constant": things the C++ standard says are evaluated in a constant context, and things we know evaluate to a specific value using any available information. (There's a few weird edge cases which don't currently fit this classification, but we're looking at fixing them.)
You're proposing to introduce a third category: things which are constant in the context of a static local.
It's possible to do that, but it only really works if clang and gcc both commit to a stable set of rules. That means we'd need a complete list of allowed operations.
https://github.com/llvm/llvm-project/pull/226645
More information about the cfe-commits
mailing list