[PATCH] D122983: [C11/C2x] Change the behavior of the implicit function declaration warning

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 15:44:28 PDT 2022


rsmith added a comment.

In D122983#3451920 <https://reviews.llvm.org/D122983#3451920>, @erichkeane wrote:

> I think Aaron's approach provides a proper 'depreciation' period in our compiler, as best as we have the ability to do.

We've been warning by default for a decade that this code is not valid in C99; that was our deprecation period. If the aim is to provide a deprecation period, the end goal should be that in some future Clang version we complete the transition and change the C99 default to reject too. Otherwise, that's not a deprecation period, that's a permanent language extension in our C99 mode -- and it seems capricious to provide that extension by default in C99 mode but not C11 / C17 mode. Given that this extension is, well, bad, I think we shouldn't be providing it by default anywhere. It's not hard for people to turn the warning flag off, and people intentionally using this in C99 onwards probably already have done so.


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

https://reviews.llvm.org/D122983



More information about the cfe-commits mailing list