On Mon, 15 Sep 2025, Alejandro Colomar wrote: > // Whatever, but at least should be self-consistent: > void l(void;); // ok > void m(void; void); // error: ‘void’ must be the only parameter and > unnamed > void n(void; int n); // error: parameter ‘({anonymous})’ has just a > forward declaration > > Regardless of whether we want l(), m(), and n() to be accepted, they > should either be all accepted or none accepted. I think all should be > accepted, but you might convince me otherwise.
I think they should all be rejected. That is, all parameter forward declarations must declare a parameter, by name, that appears in a following list of parameter declarations. See also bug 23144 regarding forward declarations being wrongly accepted with no following declarations of parameters at all. I think it would be best to separate fixing existing bugs relating to things that are wrongly accepted and not meaningful for the existing extension, from any changes that add new features or new diagnostics for things that are clearly meant to be valid with the existing extension. -- Joseph S. Myers josmy...@redhat.com