From owner-freebsd-numerics@freebsd.org Sat May 13 16:55:38 2017 Return-Path: Delivered-To: freebsd-numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD0AD6B872 for ; Sat, 13 May 2017 16:55:38 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 82C661613 for ; Sat, 13 May 2017 16:55:38 +0000 (UTC) (envelope-from dimitry@andric.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7EF6AD6B870; Sat, 13 May 2017 16:55:38 +0000 (UTC) Delivered-To: numerics@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B18CD6B86F; Sat, 13 May 2017 16:55:38 +0000 (UTC) (envelope-from dimitry@andric.com) 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 004711612; Sat, 13 May 2017 16:55:37 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:470:7a58::a8c1:a7f4:edbc:3331] (unknown [IPv6:2001:470:7a58:0:a8c1:a7f4:edbc:3331]) (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 09D253FD9B; Sat, 13 May 2017 18:55:34 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_1A165ECB-BD13-4967-A0C3-5C9609FF1B6F"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: catrig[fl].c and inexact Date: Sat, 13 May 2017 18:55:27 +0200 In-Reply-To: <20170513162153.GB88653@troutmask.apl.washington.edu> Cc: freebsd-hackers@freebsd.org, numerics@freebsd.org, Bruce Evans To: sgk@troutmask.apl.washington.edu References: <20170512215654.GA82545@troutmask.apl.washington.edu> <20170513103208.M845@besplex.bde.org> <20170513060803.GA84399@troutmask.apl.washington.edu> <20170513162153.GB88653@troutmask.apl.washington.edu> X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2017 16:55:38 -0000 --Apple-Mail=_1A165ECB-BD13-4967-A0C3-5C9609FF1B6F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 13 May 2017, at 18:21, Steve Kargl = wrote: >=20 > On Sat, May 13, 2017 at 03:08:26PM +0200, Dimitry Andric wrote: ... >=20 >> Using the full catrig.c and -O3, I tried gcc 4.2.1, 4.7.4, 4.8.5, = 4.9.4, >> 5.4.0, 6.3.0 and 7.0.1, in addition to clang 3.4.1, 3.8.0, 3.9.1, = 4.0.0 >> and 5.0.0. >=20 > Thanks for checking. I reduced catrig.c to a small self-contained > program and indeed I was getting the desired addition of 1 + tiny > to raise FE_INEXACT. I suppose that I'll need to add an appropriate > -Wno-foo to my CFLAGS line to suppress the spurious warning, which > might be tricky because -Wunused is one option I'ld like to have. The following also gets rid of the warnings: Index: lib/msun/src/catrig.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/msun/src/catrig.c (revision 318032) +++ lib/msun/src/catrig.c (working copy) @@ -37,7 +37,7 @@ #define isinf(x) (fabs(x) =3D=3D INFINITY) #undef isnan #define isnan(x) ((x) !=3D (x)) -#define raise_inexact() do { volatile float junk =3D 1 + tiny; } = while(0) +#define raise_inexact() do { volatile float junk __unused =3D 1 = + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbit(x)) Index: lib/msun/src/catrigf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/msun/src/catrigf.c (revision 318032) +++ lib/msun/src/catrigf.c (working copy) @@ -51,7 +51,7 @@ #define isinf(x) (fabsf(x) =3D=3D INFINITY) #undef isnan #define isnan(x) ((x) !=3D (x)) -#define raise_inexact() do { volatile float junk =3D 1 + tiny; } = while(0) +#define raise_inexact() do { volatile float junk __unused =3D 1 = + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitf(x)) Index: lib/msun/src/catrigl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/msun/src/catrigl.c (revision 318032) +++ lib/msun/src/catrigl.c (working copy) @@ -53,7 +53,7 @@ #define isinf(x) (fabsl(x) =3D=3D INFINITY) #undef isnan #define isnan(x) ((x) !=3D (x)) -#define raise_inexact() do { volatile float junk =3D 1 + tiny; } = while(0) +#define raise_inexact() do { volatile float junk __unused =3D 1 = + tiny; } while(0) #undef signbit #define signbit(x) (__builtin_signbitl(x)) If you are OK with that, I will commit it later today. -Dimitry --Apple-Mail=_1A165ECB-BD13-4967-A0C3-5C9609FF1B6F 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.0.30 iEYEARECAAYFAlkXOoUACgkQsF6jCi4glqOjeQCgrp2JTdTaC/b3j/+gqf56C3AV GT0AoO+KGbDi+qxoOxNrez97cSEMi/Vv =zJHP -----END PGP SIGNATURE----- --Apple-Mail=_1A165ECB-BD13-4967-A0C3-5C9609FF1B6F--