gcc.dg/noncompile/pr16876 should actually compile with a warning, rather than fail with an error.
Some work on related issues has been done before in: http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00772.html I suppose in this code: case ic_argpass: case ic_argpass_nonproto: /* ??? This should not be an error when inlining calls to unprototyped functions. */ error ("incompatible type for argument %d of %qE", parmnum, rname); break; we should emit a warning rather than an error for the ic_argpass_nonproto case. However, since we are then not set up to fail the compilation, we should not return an error_mark_node, as this could mask subsequent actual constraint violations; Instead, we should return a value of the required type; e.g. we could make NULL pointer of type pointer to type, and generate and INDIRECT_REF. -- Summary: argument mismatch for late-prototyped function should be warning, not error Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amylaar at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28848