Date: Sat, 27 Jan 2018 22:41:54 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: =?utf-8?Q?Fernando_Apestegu=C3=ADa?= <fernando.apesteguia@gmail.com> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: cad/stepccode fails on -CURRENT since clang-6.0.0 was imported Message-ID: <B365AAB9-BDD5-44BC-BA1B-66AC94FCFA94@FreeBSD.org> In-Reply-To: <CAGwOe2ZFFTVDWqjM4frMmeYQFt75QCS6J48UvRju%2BLzJ-Ck6Vw@mail.gmail.com> References: <CAGwOe2ZFFTVDWqjM4frMmeYQFt75QCS6J48UvRju%2BLzJ-Ck6Vw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_65B3958D-8733-4363-8E53-AB839C8BDCC7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 27 Jan 2018, at 18:42, Fernando Apestegu=C3=ADa = <fernando.apesteguia@gmail.com> wrote: >=20 > Since clang-6.0.0 was imported in -CURRENT > = (https://svnweb.freebsd.org/base/head/usr.bin/clang/llvm-cov/?view=3Dlog),= > cad/stepcode fails to build. It built fine in -CURRENT with > clang-5.0.0 on both i386 and amd64. ... > = /wrkdirs/usr/ports/cad/stepcode/work/stepcode-0.8/src/base/judy/src/judyL2= Array.h:169:28: > error: assigning to 'const std::__1::vector<unsigned long long, > std::__1::allocator<unsigned long long> > *' from incompatible type > 'unsigned long long' > kv.value =3D ( JudyValue ) 0; > ^~~~~~~~~~~~~~~ Like gcc 6 and higher, clang 6 now defaults to -std=3Dgnu++14, and from C++11 onwards, you must use 'nullptr' if you mean a null pointer, not the integer 0. You can either force the port to be compiled with -std=3Dgnu++98 (by adding USE_CXXSTD=3Dgnu++98 to the port Makefile), or change the two instances where these assignments are being done, e.g.: --- src/base/judy/src/judyL2Array.h.orig 2014-12-26 20:12:05 UTC +++ src/base/judy/src/judyL2Array.h @@ -166,7 +166,7 @@ class judyL2Array { kv.value =3D *_lastSlot; _success =3D true; } else { - kv.value =3D ( JudyValue ) 0; + kv.value =3D nullptr; _success =3D false; } kv.key =3D _buff[0]; --- src/base/judy/src/judyS2Array.h.orig 2014-12-26 20:12:05 UTC +++ src/base/judy/src/judyS2Array.h @@ -191,7 +191,7 @@ class judyS2Array { kv.value =3D *_lastSlot; _success =3D true; } else { - kv.value =3D ( JudyValue ) 0; + kv.value =3D nullptr; _success =3D false; } kv.key =3D _buff; -Dimitry --Apple-Mail=_65B3958D-8733-4363-8E53-AB839C8BDCC7 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWmzyIgAKCRCwXqMKLiCW o9KIAKCL8nnZ9SjFMBPfL81i+jNcniqbQgCeMov2kYTgA64AFu/R3ik6q9w+Ga8= =6I9S -----END PGP SIGNATURE----- --Apple-Mail=_65B3958D-8733-4363-8E53-AB839C8BDCC7--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B365AAB9-BDD5-44BC-BA1B-66AC94FCFA94>