Re: [PATCH] c: Diagnose compound literals with function type [PR108043]

2022-12-19 Thread Marek Polacek via Gcc-patches
On Mon, Dec 19, 2022 at 12:05:48PM +0100, Jakub Jelinek wrote: > Hi! > > Both C99 and latest C2X say that compound literal shall have an object type > (complete object type in the latter case) or array of unknown bound, > so complit with function type is invalid. When the initializer had to be >

[PATCH] c: Diagnose compound literals with function type [PR108043]

2022-12-19 Thread Jakub Jelinek via Gcc-patches
Hi! Both C99 and latest C2X say that compound literal shall have an object type (complete object type in the latter case) or array of unknown bound, so complit with function type is invalid. When the initializer had to be non-empty for such case, we used to diagnose it as incorrect initializer, b