git: c3450ad127e9 - main - clang: re-downgrade implicit int/function declarations to warning only

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 22 Jun 2023 21:11:10 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=c3450ad127e94d3fa67ae337310e59c002f51bfc

commit c3450ad127e94d3fa67ae337310e59c002f51bfc
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-04-25 19:24:04 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-22 18:22:33 +0000

    clang: re-downgrade implicit int/function declarations to warning only
    
    This reapplies upstream commit c0141f3c300f by Aaron Ballman:
    
      Downgrade implicit int and implicit function declaration to warning only
    
      The changes in Clang 15.0.0 which enabled these diagnostics as a
      warning which defaulted to an error caused disruption for people
      working on distributions such as Gentoo. There was an explicit request
      to downgrade these to be warning-only in Clang 15.0.1 with the
      expectation that Clang 16 will default the diagnostics to an error.
    
      See
      https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
      for more details on the discussion.
    
      See https://reviews.llvm.org/D133800 for the public review of these
      changes.
    
    As noted in the upstream discussion, there are many programs that fail
    to configure or build correctly, if these warnings are turned into
    errors by default.
    
    Note that most affected programs in ports are relatively old, and are
    unlikely to be fixed by actually adjusting their declarations, but by
    compiling with -std=gnu89, which downgrades the errors back to warning
    again. Lots of tedious work for very little gain.
---
 .../llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
index bfe582d8252f..31a27558bca4 100644
--- a/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/contrib/llvm-project/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -419,7 +419,7 @@ def warn_implicit_function_decl : Warning<
   InGroup<ImplicitFunctionDeclare>, DefaultIgnore;
 def ext_implicit_function_decl_c99 : ExtWarn<
   "call to undeclared function %0; ISO C99 and later do not support implicit "
-  "function declarations">, InGroup<ImplicitFunctionDeclare>, DefaultError;
+  "function declarations">, InGroup<ImplicitFunctionDeclare>;
 def note_function_suggestion : Note<"did you mean %0?">;
 
 def err_ellipsis_first_param : Error<
@@ -709,7 +709,7 @@ def ext_implicit_lib_function_decl : ExtWarn<
 def ext_implicit_lib_function_decl_c99 : ExtWarn<
   "call to undeclared library function '%0' with type %1; ISO C99 and later "
   "do not support implicit function declarations">,
-  InGroup<ImplicitFunctionDeclare>, DefaultError;
+  InGroup<ImplicitFunctionDeclare>;
 def note_include_header_or_declare : Note<
   "include the header <%0> or explicitly provide a declaration for '%1'">;
 def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">;
@@ -4390,7 +4390,7 @@ def err_ident_list_in_fn_declaration : Error<
   "a parameter list without types is only allowed in a function definition">;
 def ext_param_not_declared : ExtWarn<
   "parameter %0 was not declared, defaults to 'int'; ISO C99 and later do not "
-  "support implicit int">, InGroup<ImplicitInt>, DefaultError;
+  "support implicit int">, InGroup<ImplicitInt>;
 def err_param_default_argument : Error<
   "C does not support default arguments">;
 def err_param_default_argument_redefinition : Error<
@@ -10104,7 +10104,7 @@ def warn_receiver_forward_class : Warning<
 def note_method_sent_forward_class : Note<"method %0 is used for the forward class">;
 def ext_missing_type_specifier : ExtWarn<
   "type specifier missing, defaults to 'int'; ISO C99 and later do not support "
-  "implicit int">, InGroup<ImplicitInt>, DefaultError;
+  "implicit int">, InGroup<ImplicitInt>;
 def err_missing_type_specifier : Error<
   "a type specifier is required for all declarations">;
 def err_decimal_unsupported : Error<