[clang] [clang] reject initializing constexpr objects with compound literals that contain non-null pointers (PR #230477)
Abdulmalek Almkainzi via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 15 02:59:14 PDT 2026
aalmkainzi wrote:
The problem is that there is a difference between file scope compound literal and `constexpr`.
```C
const int a = 1;
constexpr int i = (int){a}; // ok
constexpr int j = a; // error
```
I'm looking into it a bit more. Maybe this PR is not going to be needed if I manage to fix the root issue.
https://github.com/llvm/llvm-project/pull/230477
More information about the cfe-commits
mailing list