Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2022 17:55:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 265425] [exp-run] Against llvm-15-update branch on GitHub
Message-ID:  <bug-265425-7788-2LBFsa8KB2@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-265425-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-265425-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265425

Dimitry Andric <dim@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brooks@FreeBSD.org

--- Comment #13 from Dimitry Andric <dim@FreeBSD.org> ---
I would like to solicit some feedback about a few huge (in my opinion at le=
ast)
behavior changes in clang 15, as compared to clang 14:

1) In
https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb5=
6e2d94626
("[C11/C2x] Change the behavior of the implicit function declaration warnin=
g"),
the -Wimplicit-function-declaration 'warning' became an error for C99 and
later.

2) In
https://github.com/llvm/llvm-project/commit/2cb2cd242ca08d0bbd2a51a41f13174=
42e5414fc
("Change the behavior of implicit int diagnostics"), the -Wimplicit-int
'warning' became an error for C99 and later.

Of all the errors in Antoine's logs, -Wimplicit-function-declaration is more
than half, and roughly 16% are -Wimplicit-int errors:

% grep error: *.log > errors.txt
% wc -l errors.txt
    3257 errors.txt
% grep Wimplicit-function-declaration errors.txt | wc -l
    1848
% grep Wimplicit-int errors.txt | wc -l
     525

I looked through a few ports, and while some of these can be 'fixed' by add=
ing
USE_CSTD=3Dgnu89 or USE_CSTD=3Dc89, lots of them either don't respect the U=
SE_CSTD=3D
setting or fail to pick up CFLAGS.

So I'm wondering whether it is worthwhile to partially revert upstream comm=
its
1) and 2), turning the errors back into warnings again.

This would temporarily save us, until C2x becomes the default language dial=
ect,
but at some point this technical debt must paid: e.g. all ports that use
"old-style" C (K&R, C89 without prototypes, implicit int etc etc) should
explicitly be marked such, or they have to be patched to use an older compi=
ler.

What's the general opinion on this in the ports team?

(Btw, going through all these ports with a fine toothed comb is probably the
most future-proof, but I simply do not have the time for it.)

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265425-7788-2LBFsa8KB2>