[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 13 07:35:12 PDT 2022
dexonsmith added a comment.
In D122895#3511611 <https://reviews.llvm.org/D122895#3511611>, @dexonsmith wrote:
> Previously, `-Wstrict-prototypes` was useful for preventing actual bugs in code.
For example, it's important to have a warning that catches code like this:
void f1(void (^block)());
void f2(void) {
f1(^(int x) { /* do something with x */ });
}
without triggering in cases that are pedantic.
(It also seems unfortunate to regress the false positive rate of this diagnostic before `-fstrict-prototypes` is available.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122895/new/
https://reviews.llvm.org/D122895
More information about the cfe-commits
mailing list