On Sun, Aug 02, 2020 at 01:57:11PM +0000, Taylor R Campbell wrote: > But it sounds like the original motivation is that it triggered > -Wvla...which frankly strikes me as a compiler bug since there's > obviously no actual VLA created in sizeof; as far as I can tell > there's no semantic difference between sizeof(device_t[n]) and > sizeof(device_t) * n.
Yes, it seems strange to trigger a VLA warning in code that it is required to be compile-time evaluated. Joerg