From nobody Wed Jul 17 20:26:57 2024 X-Original-To: freebsd-numerics@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WPSCR5RGQz5QKnk for ; Wed, 17 Jul 2024 20:26:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPSCR4GQ1z4fnh for ; Wed, 17 Jul 2024 20:26:59 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Authentication-Results: mx1.freebsd.org; none Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.17.1/8.17.1) with ESMTP id 46HKQwrM015400; Wed, 17 Jul 2024 13:26:58 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) DKIM-Filter: OpenDKIM Filter v2.10.3 troutmask.apl.washington.edu 46HKQwrM015400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=troutmask.apl.washington.edu; s=troutmask; t=1721248018; bh=rsJebNUPPgf3b0VbLnMKFXAFPUx0xSs0+RFY/E3sZB4=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=rjEVL7nQE9qGY2X2SZJu0e6Mu/aqulD0C6b2FOWAyuclS1K7vpfWcnVlseMx0QBH5 MKAq+DfYyKJOy56EqgLu+2ybZb3csPfHDgWXJ9u8IhBeIQ2TXnbrp/DqdJd0kL7GnZ YzbvsgTuQHxr4/Ue2oe6txkGGAsThdZr8Tg6rkgtyDxV4oOq8e/+yAKXsVqB1czE8W r6m8VAzs5CeB5TuX/COcpEQ6xXch3bqEAWkK5w7M9qXpDzAJMHQ8bLAdliJTylVjPI Z3MhL6VbrBIVKLS9DHaG2AniZ0gES7lrKFIgkNasH58Aky2hKs/BUwYO3NqTd8oRLt 9quvM95PQa3UA== Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.17.1/8.17.1/Submit) id 46HKQvlL015399; Wed, 17 Jul 2024 13:26:57 -0700 (PDT) (envelope-from sgk) Date: Wed, 17 Jul 2024 13:26:57 -0700 From: Steve Kargl To: enh Cc: enh via freebsd-numerics Subject: Re: #pragma STDC FENV_ACCESS ON Message-ID: Reply-To: sgk@troutmask.apl.washington.edu References: List-Id: Discussions of high quality implementation of libm functions List-Archive: https://lists.freebsd.org/archives/freebsd-numerics List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-numerics@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:73, ipnet:128.95.0.0/16, country:US] X-Rspamd-Queue-Id: 4WPSCR4GQ1z4fnh On Wed, Jul 17, 2024 at 04:16:33PM -0400, enh wrote: > On Wed, Jul 17, 2024 at 4:01 PM Steve Kargl > wrote: > > > > On Wed, Jul 17, 2024 at 01:30:39PM -0400, enh wrote: > > > i see lib/msun/src/e_sqrtl.c has `#pragma STDC FENV_ACCESS ON`, but > > > s_fma.c, s_fmaf.c, s_fmal.c, and s_nearbyint.c all use fesetround() or > > > fesetenv() too --- shouldn't they also have the pragma? > > > > > > (Android currently builds all of libm with that pragma, but (a) that > > > seems like a big hammer and (b) afaict upstream [you] don't, so this > > > is potentially causing problems^W^Wallowing the compiler to cause > > > problems for you?) > > > > Some of the compilers, which that are used to compile FreeBSD, > > do not support "#pragma STDC FENV_ACCESS ON". > > that's why you have a line in the Makefile to quiet the warning :-) > > (remember you _do_ have this #pragma in e_sqrtl.c already.) > Then your original post is simply a rhetorical question? Consider it future-proofing for when all compilers supprt the pragma. -- Steve