https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97860
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Martin Sebor from comment #3) > I was going to commit the following but I'll leave it to you. > > diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c > index d348e39c27a..95cf9e4cb00 100644 > --- a/gcc/c/c-decl.c > +++ b/gcc/c/c-decl.c > @@ -5775,6 +5775,10 @@ get_parm_array_spec (const struct c_parm *parm, tree > attrs) > type = TREE_TYPE (type)) > { > tree nelts = array_type_nelts (type); > + if (error_operand_p (nelts)) > + /* Avoid erroneous expressions. */ > + return attrs; > + > if (TREE_CODE (nelts) != INTEGER_CST) > { > /* Each variable VLA bound is represented by the dollar For errors why not, but typedef int T[0]; really is not an error actually.