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

From: Jessica Clarke <jrtc27_at_freebsd.org>
Date: Tue, 28 Jan 2025 18:32:33 UTC
On 22 Jun 2023, at 22:11, Dimitry Andric <dim@FreeBSD.org> wrote:

> 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.

This remains as a downstream divergence 1.5 years later, but I do not
think we should be carrying this indefinitely. Software needs to build
with upstream LLVM, and the fact that many ports do not is now biting
us for CheriBSD where we use our own external toolchain that does not
have such a diff. In my opinion this should be reverted for FreeBSD 15
and it’s long time for ports people to step up or have the broken ports
removed; we can’t keep going on like this with abandonware holding back
forward progress.

Jess