[clang] [Clang][OpenMP] Fix crash on a `braced-init-list` in the `init` or increment of a transformed loop (PR #233248)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 03:45:15 PDT 2026


alexey-bataev wrote:

> > Why do we want to reject this, why not fix handling of this kind of initializers?
> 
> I considered `{}` as outside the canonical form, since the spec wants an expression there and GCC rejects every braced spelling. It is now handled as the value-initialized zero of the counter type, so `int i = {}` and `i += {}` are analysed like `0`.

Do not use ПСС as kind of reference compiler, it is not. If `int i = {}` is allowed by the C/C++, it should be enable for OpenMP too, I do not remember OpenMP standard to not allow this form

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


More information about the cfe-commits mailing list