c: Restore warning for incomplete structures declared in parameter list [PR117866]
In C23 mode the warning about declaring structures and union in
parameter lists was removed, because it is possible to redeclare
a compatible type elsewhere. This is not the case for incomplete types,
so restore the warning for those types.
PR c/117866
gcc/c/ChangeLog:
* c-decl.cc (get_parm_info): Change condition for warning.
gcc/testsuite/ChangeLog:
* gcc.dg/pr117866.c: New test.
* gcc.dg/strub-pr118007.c: Adapt.