https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108043
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:4e4620d8c796af482b57b94932618d1f9d9af9f7 commit r13-4797-g4e4620d8c796af482b57b94932618d1f9d9af9f7 Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Dec 19 20:55:56 2022 +0100 c: Diagnose compound literals with function type [PR108043] 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, but with (fntype){} now allowed we just ICE on it. The following patch diagnoses that. 2022-12-19 Jakub Jelinek <ja...@redhat.com> PR c/108043 * c-parser.cc (c_parser_postfix_expression_after_paren_type): Diagnose compound literals with function type. * gcc.dg/pr108043.c: New test. * gcc.dg/c99-complit-2.c (foo): Adjust expected diagnostics for complit with function type.