This is an archive of the discontinued LLVM Phabricator instance.

Downgrade error about stdcall decls with no prototype to a warning
ClosedPublic

Authored by rnk on Sep 24 2014, 9:57 AM.

Details

Summary

The MIDL compiler produces code that does this.

If we wanted to improve the warning, I think we could do this:

void __stdcall f(); // Don't warn without -Wstrict-prototypes.
void g() {
  f(); // Might warn, the user probably meant for f to take no args.
  f(1, 2, 3); // Warn, we have no idea what args f takes.
  f(1); // Error, this is insane, one of these calls is broken.
}

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 14039.Sep 24 2014, 9:57 AM
rnk retitled this revision from to Downgrade error about stdcall decls with no prototype to a warning.
rnk updated this object.
rnk added a reviewer: thakis.
rnk added a subscriber: Unknown Object (MLST).
thakis edited edge metadata.Sep 24 2014, 10:05 AM

lgtm, thanks! Mention PR21027 somewhere.

rnk closed this revision.Sep 24 2014, 10:59 AM
rnk updated this revision to Diff 14043.

Closed by commit rL218394 (authored by @rnk).