This code in store_parm_decls never fired, because we were checking VOID_TYPE_P on the PARM_DECL itself rather than its type. And we already check for void parms in grokparms, so there's no point in doing it here.
Tested x86_64-pc-linux-gnu, applying to trunk.
commit 7bc6f4c24e2e853ff18bd61f116e02d3b9fe7b6f Author: Jason Merrill <ja...@redhat.com> Date: Mon Jul 11 01:38:35 2016 -0400 * decl.c (store_parm_decls): Remove check for void parm. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c86a131..09bb767 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -14376,13 +14376,7 @@ store_parm_decls (tree current_function_parms) { next = DECL_CHAIN (parm); if (TREE_CODE (parm) == PARM_DECL) - { - if (DECL_NAME (parm) == NULL_TREE - || !VOID_TYPE_P (parm)) - pushdecl (parm); - else - error ("parameter %qD declared void", parm); - } + pushdecl (parm); else { /* If we find an enum constant or a type tag,