Ping: https://gcc.gnu.org/ml/gcc-patches/2019-01/msg01340.html
This is a straightforward fix for an ICE. I will commit it tomorrow unless there are suggestions for other changes. On 1/22/19 6:18 PM, Martin Sebor wrote:
The enhancement to treat char initializer-lists as STRING_CSTs committed earlier last year introduced an assumption that array elements have a non-zero size. As it turns out, the zero-length array extension that makes it possible to define even multi- dimensional zero-length array objects breaks that assumption when it's passed as an argument to a function like memcpy. The attached patch removes that assumption. Tested on x86_64-linux. Martin PS In GCC 10, unless there is an important use case that escapes me, I think GCC should warn for zero-length non-member array objects, or perhaps even for internal struct members (those followed by another member). Not to avoid these sorts of bugs but because they seem too dangerous to use safely.