From owner-freebsd-current@FreeBSD.ORG Sat Aug 17 14:39:36 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4F6B7356; Sat, 17 Aug 2013 14:39:36 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0BE2AC2; Sat, 17 Aug 2013 14:39:35 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.80.1) with esmtp (envelope-from ) id <1VAhfB-002K9Q-DH>; Sat, 17 Aug 2013 16:39:33 +0200 Received: from e179075120.adsl.alicedsl.de ([85.179.75.120] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.80.1) with esmtpsa (envelope-from ) id <1VAhfB-003ToE-8F>; Sat, 17 Aug 2013 16:39:33 +0200 Date: Sat, 17 Aug 2013 16:39:29 +0200 From: "O. Hartmann" To: David Chisnall Subject: Re: graphics/blender: math.h: isnan(): error: controlling expression type 'unsigned int' not compatible with any generic association type Message-ID: <20130817163929.1993d012@thor.walstatt.dyndns.org> In-Reply-To: <779CBD97-A751-4168-BFF0-F984BEE615CE@FreeBSD.org> References: <20130817114818.7d5cd89a@thor.walstatt.dyndns.org> <779CBD97-A751-4168-BFF0-F984BEE615CE@FreeBSD.org> Organization: FU Berlin X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/tt0nl4U3u.NGh6mkmsW.ine"; protocol="application/pgp-signature" X-Originating-IP: 85.179.75.120 Cc: FreeBSD CURRENT , FreeBSD Ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Aug 2013 14:39:36 -0000 --Sig_/tt0nl4U3u.NGh6mkmsW.ine Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 17 Aug 2013 11:24:41 +0100 David Chisnall wrote: > On 17 Aug 2013, at 10:48, "O. Hartmann" > wrote: >=20 > > port graphics/blender doesn't compiler neither in CURRENT nor > > 9.2-PRE for the moment. On CURRENT (FreeBSD 10.0-CURRENT #4 > > r254430: Fri Aug 16 23:23:08 CEST 2013 amd64), compilation fails > > with the belwo shown error message - for roughly a month now.=20 > >=20 > > I think this is dur to some issues of inconsistency/incompatibility > > of the math.h/cmath headers regarding the reported c++11 issues. > >=20 > >=20 > > Since port graphics/blender doesn't compile on 9.2 nor does it > > compile in CURRENT and the fact that the math.h isn't fixed in the > > 9.2-RELEASE as I was told, the port should be marked broken. > >=20 > >=20 > >=20 > > [ 55%] Building C object > > source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineo= n_dpx.c.o > > [ 55%] Building C object > > source/blender/imbuf/intern/cineon/CMakeFiles/bf_imbuf_cineon.dir/cineo= nlib.c.o /usr/ports/graphics/blender/work/blender-2.68/source/blender/imbuf= /intern/cineon/cineonlib.c:280:70: > > error: controlling expression type 'unsigned int' not compatible > > with any generic association type if (cineon->element[i].refLowData > > =3D=3D CINEON_UNDEFINED_U32 || isnan(cineon->element[i].refLowData)) > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/math.h:118:19: note: > > expanded from macro 'isnan' __fp_type_select(x, __inline_isnanf, > > __inline_isnan, __inline_isnanl) ^ /usr/include/math.h:86:49: note: > > expanded from macro '__fp_type_select' #define __fp_type_select(x, > > f, d, ld) _Generic((x), =20 >=20 > This looks like a correct error. isnan(unsigned int) is undefined > behaviour in C or C++. Now, we have a hard error instead of doing > something random. This change was made it make it easier to find > logic errors at compile time, and it seems to be doing exactly that > here: now the port fails to build, rather than building and having > undefined behaviour. >=20 > David >=20 Hello David. Thank you very much for this insight. As I understand it for now, the math.h/cmath behaviour is as expected by defintion an correct so far in FreeBSD? If yes, it would imply that the port graphics/blender is broken then. In the latter case the blender developers should be correct this upstream, shouldn't they? Again, thank you very much and for the patience explaining it again. Regards, Oliver --Sig_/tt0nl4U3u.NGh6mkmsW.ine Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBAgAGBQJSD4slAAoJEOgBcD7A/5N85iwIALj5iMpiz7AjhRILhjY9vzk9 hyks2X1N0b2hTtsTqaYJCSsIqJeftpkGUa3QTzQkK+A15mrpdd5pDo4avS6uigCK FL+si6ynW1MAYUb97LniTTC1p5KleuhTanIElAgxD+SE3WLXYsIG3w93M/9aifLX dUXxPDABHdK8unZ/L/7UlcJ4JaTgHbqYywPWs436Te+brJgDV16F2a1FAQqod3Je R5T1PkTi7Md2nuS/tuA/YA85AOBxUgnuZcFKXvi32q1KAaeAcZH2K/xyfcSgfprM mViQTCnlXbO8F+bMc/32cu5fjhqeTlGYpbZPNAt7/PkfDB8Zt5ZNfa1gTa0h0IY= =Erze -----END PGP SIGNATURE----- --Sig_/tt0nl4U3u.NGh6mkmsW.ine--