gcc should warn when the stack frame for a called varargs function is in excess of a -Wframe-larger-than=NNN bytes. Such a check could be done at each call site, to see whether the outgoing arguments alone already exhaust NNN.
-- Summary: -Wframe-larger-than should warn about outgoing function calls, specifically varargs Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fche at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41633