[PATCH] D66919: Warn about zero-parameter K&R definitions in -Wstrict-prototypes

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 12 16:08:14 PST 2020


aaronpuchert added a comment.

@aaron.ballman We could make the warning even stricter, but that should be a separate discussion. Is this change Ok for now?



================
Comment at: clang/test/Sema/warn-strict-prototypes.c:60-62
 // K&R function definition with previous prototype declared is not diagnosed.
 void foo11(int p, int p2);
 void foo11(p, p2) int p; int p2; {}
----------------
We might want to warn here as well, but that should be a separate change.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66919/new/

https://reviews.llvm.org/D66919





More information about the cfe-commits mailing list