Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2022 00:04:44 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Jan Beich <jbeich@FreeBSD.org>
Cc:        "ports-committers@freebsd.org" <ports-committers@FreeBSD.org>, "dev-commits-ports-all@freebsd.org" <dev-commits-ports-all@FreeBSD.org>, "dev-commits-ports-main@freebsd.org" <dev-commits-ports-main@FreeBSD.org>
Subject:   Re: git: 4ba3797c9993 - main - graphics/png: fix build with clang 15
Message-ID:  <2BED1670-C064-412E-BB7A-8DB9560F96E9@FreeBSD.org>
In-Reply-To: <5yjd-6sad-wny@FreeBSD.org>
References:  <202207311714.26VHEL73016804@gitrepo.freebsd.org> <5yjd-6sad-wny@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_575F6B3F-3E09-4519-829B-E49BA58D56CC
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 31 Jul 2022, at 20:39, Jan Beich <jbeich@FreeBSD.org> wrote:
>=20
> Dimitry Andric <dim@FreeBSD.org> writes:
>=20
>> The branch main has been updated by dim (src committer):
>>=20
>> URL: =
https://cgit.FreeBSD.org/ports/commit/?id=3D4ba3797c9993a25a082ed767d4f442=
34b1f7dc04
>>=20
>> commit 4ba3797c9993a25a082ed767d4f44234b1f7dc04
>> Author:     Dimitry Andric <dim@FreeBSD.org>
>> AuthorDate: 2022-07-30 16:37:48 +0000
>> Commit:     Dimitry Andric <dim@FreeBSD.org>
>> CommitDate: 2022-07-31 17:12:11 +0000
>>=20
>>    graphics/png: fix build with clang 15
>>=20
>>    Building png with clang 15 results in an error:
>>=20
>>        contrib/libtests/pngvalid.c:11662:4: error: call to undeclared =
function 'feenableexcept'; ISO C99 and later do not support implicit =
function declarations [-Wimplicit-function-declaration]
>>           feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
>>           ^
>>=20
>>    This is because clang 15 introduced this new warning, and fenv.h =
only
>>    declares feenableexcept() when compiling for C standards before =
C11.
>=20
> -Wimplicit-function-declaration is ancient, so Clang 15 made it fatal
> for C99 or later. feenableexcept() is under __BSD_VISIBLE, so hidden =
in
> _POSIX_SOURCE mode as used by libpng. Linux cheats via _GNU_SOURCE
> which is ignored on FreeBSD, so you get the above warning.
>=20
> Where did C11 come from?
>=20
> See also https://github.com/llvm/llvm-project/commit/7d644e1215b3

Indeed, this is a pretty big change, which has the potential to cause
lots of breakage; I have added some notes and a request for feedback
here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265425#c13

-Dimitry


--Apple-Mail=_575F6B3F-3E09-4519-829B-E49BA58D56CC
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYub8fAAKCRCwXqMKLiCW
o+1RAKDUkzg6HD5gK5hlazWmXX00xYe80ACg+f593AwFAMZQ8QDcGNkSeznSXOo=
=juHQ
-----END PGP SIGNATURE-----

--Apple-Mail=_575F6B3F-3E09-4519-829B-E49BA58D56CC--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2BED1670-C064-412E-BB7A-8DB9560F96E9>