From nobody Wed Jul 17 20:16:33 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 4WPRzf6Snwz5QJPV for ; Wed, 17 Jul 2024 20:16:46 +0000 (UTC) (envelope-from enh@google.com) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WPRzf1sMQz4fRJ for ; Wed, 17 Jul 2024 20:16:46 +0000 (UTC) (envelope-from enh@google.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-e05f4c63de6so130248276.0 for ; Wed, 17 Jul 2024 13:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721247405; x=1721852205; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zWXs+Us1tLz0qMvT6H+pYzagq51MeOp7YDXR6Otdfhw=; b=o8+SzCba6Up9JCrE3wPEbBcQP2LZ2s/ObCQ2Qcf0wjREZwAcu0029TEVu4sxoN6dRb YyDzl8pikBwm9dfvwm0oVxgUkn89aRmTlJjR+HLA/L+yFQKWHACOZAfA5NFr+6ICgOy/ 7kKbU4CP1LLUx0zqjjBiMtIjuWzLgBN/BmomlB2tZfbE1iYaCqmsZ77HPCSFrNksoeLa 7pd1Pip9YcIeD/1hKWSSK/CAArSX5cKsfzjx8fJfnej6IIUQwsE1RMuktEpJ9paUTShi zxybIbCBVRqNBDLDBecUGYra4cYbYEdhPlyWJxONYvwVryz9I6ZobCkBPkrCLlQgP8hk zLsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721247405; x=1721852205; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zWXs+Us1tLz0qMvT6H+pYzagq51MeOp7YDXR6Otdfhw=; b=hkEMwaJ1oeEtOSKrlLUiy7r3VbtcT0DFcPe7/bVhBlj97GCPUh34pzZyCCwcBSAVki KC3YrflDPfSoqQ64ARp7oJ4tHkjf0DD0tlZ/sfLTwpIyvZenT9ye2AUCY+ZlvqkKw5P9 nxvo5MlHLC2764JgrK01WJLPL8zkLkdf+l+qBFQ5AVeXc5/pCxMyEHeVSZhZKTxkuUBw 54iEUXctVJNlwipKQ/R8JGu76IdvKFPiw+HQimuxNVg1yah3sVrfnpH7tf4bclqeTs8d 6NnE4J7F/mDn6Yab/DwTZq0kRzpqx/DyouWAClAxm8ENAj4b6hx6JO9Yj94PRmdcxbAd lcqg== X-Gm-Message-State: AOJu0Yy870xBC7sbPaxC/QAy8jfwTHB760Ixcd4D9hnh5/iK/TNWEJCS NAB1Ltxz/i1Wadt6q8L7Sc0/BG2b8stt7yVyD6Yu/RuoZf4iiGL+JL1fYhLZaW/jSTbiUFRIphu G3stEufoc2P0wA6VeccFDgHm9rivREzvXK7jLhQm44fB/4Y8tfEwA X-Google-Smtp-Source: AGHT+IHbre8AujRcrvmiT+K1sIuVcxqUL8j1CAhr8f5QYDTusw6k/2YabYf6lMfd8uvKSVEiBJQdMfeTYIgC0WQ4sVo= X-Received: by 2002:a05:6902:120c:b0:e05:fc30:7057 with SMTP id 3f1490d57ef6-e05febc8674mr681202276.43.1721247405143; Wed, 17 Jul 2024 13:16:45 -0700 (PDT) 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 References: In-Reply-To: From: enh Date: Wed, 17 Jul 2024 16:16:33 -0400 Message-ID: Subject: Re: #pragma STDC FENV_ACCESS ON To: sgk@troutmask.apl.washington.edu Cc: enh via freebsd-numerics Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WPRzf1sMQz4fRJ On Wed, Jul 17, 2024 at 4:01=E2=80=AFPM 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.) > #include > #include > > #pragma STDC FENV_ACCESS ON > > int > main(void) > { > double x =3D 1, y =3D 3; > printf ("x _ y =3D %la\n", x + y); > return 0; > } > > % gcc13 -c -Wall a.c > .c:5: warning: ignoring '#pragma STDC FENV_ACCESS' [-Wunknown-pragmas] > 5 | #pragma STDC FENV_ACCESS ON > | > > -- > Steve >