https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96120
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- GCC's diagnostic seems fine to me. Using 'void' as the type of a parameter is invalid. There's a special case for (void) but that isn't relevant to your declaration, which has two parameters.