From owner-freebsd-hackers@freebsd.org Sat Jan 27 21:42:03 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF20EEC412E for ; Sat, 27 Jan 2018 21:42:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A14EE7B0D6 for ; Sat, 27 Jan 2018 21:42:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 58D02EF51; Sat, 27 Jan 2018 22:41:55 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_65B3958D-8733-4363-8E53-AB839C8BDCC7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: cad/stepccode fails on -CURRENT since clang-6.0.0 was imported Date: Sat, 27 Jan 2018 22:41:54 +0100 In-Reply-To: Cc: FreeBSD Hackers To: =?utf-8?Q?Fernando_Apestegu=C3=ADa?= References: X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 21:42:04 -0000 --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 = 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 std::__1::allocator > *' 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--