https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88704
--- Comment #4 from Joseph S. Myers <jsm28 at gcc dot gnu.org> --- Author: jsm28 Date: Tue Dec 3 01:27:43 2019 New Revision: 278917 URL: https://gcc.gnu.org/viewcvs?rev=278917&root=gcc&view=rev Log: Diagnose use of [*] in old-style parameter definitions (PR c/88704). GCC wrongly accepts [*] in old-style parameter definitions because because parm_flag is set on the scope used for those definitions and, unlike the case of a prototype in a function definition, there is no subsequent check to disallow this invalid usage. This patch adds such a check. (At this point we don't have location information for the [*], so the diagnostic location isn't ideal.) Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/88704 gcc/c: * c-decl.c (store_parm_decls_oldstyle): Diagnose use of [*] in old-style parameter definitions. gcc/testsuite: * gcc.dg/vla-25.c: New test. Added: trunk/gcc/testsuite/gcc.dg/vla-25.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c trunk/gcc/testsuite/ChangeLog