Re: C PATCH to fix ICE with -Wformat and zero-length array (PR c/80919)

2017-06-02 Thread Joseph Myers
On Fri, 2 Jun 2017, Marek Polacek wrote: > In the C FE, zero-length arrays require structural equality, so we can't > compare their canonical types, 'cause they're NULL. But matching_type_p > didn't > know that so we were crashing. With this patch the ICE is gone and the > warning > messages a

C PATCH to fix ICE with -Wformat and zero-length array (PR c/80919)

2017-06-02 Thread Marek Polacek
In the C FE, zero-length arrays require structural equality, so we can't compare their canonical types, 'cause they're NULL. But matching_type_p didn't know that so we were crashing. With this patch the ICE is gone and the warning messages are the same as with e.g. "int a[1]". Bootstrapped/regte