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

James Y Knight via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 12:08:23 PDT 2022


jyknight added a comment.

In D122983#3454406 <https://reviews.llvm.org/D122983#3454406>, @aaron.ballman wrote:

> In D122983#3452994 <https://reviews.llvm.org/D122983#3452994>, @rsmith wrote:
>
>> I think we should just make this an error by default in C99 onwards;
>
> Out of curiosity -- do you think we should remove the `DefaultIgnore` in C89 mode so that we warn by default there (perhaps as a follow up)? Also, I presume you expect `diag::ext_implicit_lib_function_decl` to behave the same way (warn in C89, warn-as-err in C99 and up) as part of this patch?

I'm not sure what purpose it'd serve to change -std=c89 to be more strict at this point. It's not the default compilation mode, and the code is actually valid under that standard. IMO, adding such a on-by-default warning there would only serve to annoy folks explicitly trying to build super-old code with a super-old standards version.


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

https://reviews.llvm.org/D122983



More information about the cfe-commits mailing list