[PATCH] D122895: [C89/C2x] Improve diagnostics around strict prototypes in C
Tom Honermann via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 29 07:34:06 PDT 2022
tahonermann added a comment.
> I think it's debatable whether this is a bug or not
For C99 through C17, I kind of agree, but for C2x (where the warning is still issued with `-Wstrict-prototypes`), my understanding is that `void foo(void)` and `void foo()` are equivalent; there is no unprototyped declaration. I think the diagnostic should at least be suppressed for C2x since we don't want to encourage programmers to explicitly add `void` when targeting that standard.
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