From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99603 invoked by alias); 13 Aug 2019 07:50:37 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 99595 invoked by uid 89); 13 Aug 2019 07:50:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Aug 2019 07:50:35 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E333F3086262 for ; Tue, 13 Aug 2019 07:50:33 +0000 (UTC) Received: from calimero.vinschen.de (ovpn-116-213.ams2.redhat.com [10.36.116.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0DA5811A8 for ; Tue, 13 Aug 2019 07:50:33 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4A393A80733; Tue, 13 Aug 2019 09:50:32 +0200 (CEST) Date: Tue, 13 Aug 2019 07:50:00 -0000 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: generic fenv wrapup Message-ID: <20190813075032.GR11632@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="J9FDM06y/La6Wdcu" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019/txt/msg00474.txt.bz2 --J9FDM06y/La6Wdcu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1846 On Aug 12 08:51, Joel Sherrill wrote: > Hi >=20 > We discussed a lot for this patch. I see FE_NOMASK_ENV isn't included. > When looking at that, the comment in /usr/include/bits/fenv.h on CentOS 7 > has a subject verb agreement issue that leads me to question its intent. > I would like someone to confirm that the glibc manual and this comment > mean the same thing: >=20 > ifd#f __USE_GNU > /* Floating-point environment where none of the exception is masked. */ > # define FE_NOMASK_ENV ((const fenv_t *) -2) > #endif >=20 > And from the manual: >=20 > If possible, the GNU C Library defines a macro FE_NOMASK_ENV which re= p=E2=80=90 > resents an environment where every exception raised causes a tr= ap > to > occur. You can test for this macro using #ifdef. It is defined > only > if _GNU_SOURCE is defined. >=20 > I think the manual version is clearer on intent. >=20 > Also.. there are three other GNU specific methods: >=20 > #define _GNU_SOURCE /* See feature_test_macros(7) */ > #include >=20 > int feenableexcept(int excepts); > int fedisableexcept(int excepts); > int fegetexcept(void); >=20 > Should all those be added conditionally? _GNU_SOURCE definitely. Conditionally on what else?=20=20 > What else did we think needed to be done with the fenv generic code before > moving on to focusing on implementations? Just have a look into Cygwin's fenv.h. There's also fegetprec/fesetprec which have been defined with SunOS and made it into a standarization proposal http://www.open-std.org/jtc1/sc22//WG14/www/docs/n752.htm They have not been standarized, though, so this is kind of optional. They should probably get defined for x86{_64} but not necessarily for any other target. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --J9FDM06y/La6Wdcu Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1Sa8gACgkQ9TYGna5E T6C8Ig//emtTyZGiDEj8m5Q3ZULgC+j56CVLqBsQdv2/RloXnyUbxyvhZYKqdmrT lrnjvBiDeVUii/bDRcd0JYrL+AJLxvQxWwTkGJOSJuTvH1OMwwmqnpO/An0Kv3uH 9TETmfLt2QdsPfNh00B1sxiKJHAwYKWp5ulbBDc0YQpFEbMap0IVbZ9gxmtGxpyw qgJV9ustU6uBFdNUA3D5qfO4YNOrxX52K3u61BeqE/HghMn+t5LrOhD3tOJFyMOn KkmbFhDg6YiBNlN8s1j3sLOnE9DTyZUJnE4j7lHFATg7ywM713VSdjO/eYHUmpJG VZM/3rcYPoq8SD1/6EMHOWCKS9q6bUh1lYWh/CLmPxi/O4qjzAm8Ni5uPKq8jgDA JJapyZc5IGYYgLpIBdkd9FCDRSCkr5Ien1xpYeCJSYe/DrSnEAnJhoWexb7s70fu jBenHvxAM45QW9aAzhr6Ko8QGoYIZ5BX1NpH0Y2kAtfii+2/hszZwlofsyks8n49 IsSKqR8MwDdC87HKbTgGzM87lOlbqNw/3odwWYY3V5/2LIcYeOpeoemN7MUfRI4M MOosqYEtdWW2QT+GkQ3JQqf7iqDsGCFU1ZL8gxSRSFmlK8i6uUIYRUTQjt5B/IdP /j9YackH5ocVpIJtS83X8kcq7D1ljaZzzu798EontV8w3Atmgrc= =XQYX -----END PGP SIGNATURE----- --J9FDM06y/La6Wdcu--