kees wrote:

I guess I don't have a strong opinion here, since these helpers are specific to 
C++, and I've been generally trying to remove fixed-size 0-sized arrays in C 
projects (i.e. the Linux kernel). I do care about C flexible arrays (and their 
associated extensions), though. I suspect there is some existing weirdness for 
C++ when using static initializers, though. See https://godbolt.org/z/PnYMcxhfM

```
struct S { int a; int b[]; };
static struct S s = { .a = 42, .b = { 10, 20, 30, 40 }, };
static struct S z = { .a = 13, };
```

Specifically `z.b` is a 0-sized flexible array, but `s.b` isn't. Should they 
have different results?

https://github.com/llvm/llvm-project/pull/86652
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to