[PATCH] D123955: [C2x] Disallow functions without prototypes/functions with identifier lists
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 18 12:16:07 PDT 2022
aaron.ballman created this revision.
aaron.ballman added reviewers: jyknight, eli.friedman, hubert.reinterpretcast, erichkeane, clang-language-wg.
Herald added subscribers: dexonsmith, jdoerfert, martong.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.
WG14 has elected to remove support for K&R C functions in C2x. The feature was introduced into C89 already deprecated, so after this long of a deprecation period, the committee has made an empty parameter list mean the same thing in C as it means in C++: the function accepts no arguments exactly as if the function were written with `(void)` as the parameter list.
This patch implements WG14 N2841 No function declarators without prototypes (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2841.htm) and WG14 N2432 Remove support for function definitions with identifier lists (http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2432.pdf).
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14334 bytes
Desc: not available
More information about the cfe-commits