From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129164 invoked by alias); 8 Aug 2019 04:12:21 -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 129058 invoked by uid 89); 8 Aug 2019 04:12:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mailserver2.caci.com Received: from mailserver2.caci.com (HELO mailserver2.caci.com) (204.194.77.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Aug 2019 04:12:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=caci.com; i=@caci.com; q=dns/txt; s=caci; t=1565237527; x=1596773527; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=C0vDA738geHNLBysx5U52Lik09hDHp+8evxLZtz66jA=; b=jlnvVaQvncmBR6DRkyXdAqFKfVSbCVJz1fmYJ3hGZD4ggIvFjdZ3s3Q8 hKEspx+0Lr468v2vH4zVpQGMmQ2xhC3DMkpNMMCkfdMGDlDnUWOcS98Lg 3XvXeWRwIhAEGF4Ej3365rklwoONFDzrkdl3JmSJ/uul9DvQBUTMY/UjF EBIFuScaGiWBOfFEmCslp5Fo8AXyGo6KvrVOiw3MPnpYkgcmMZmlKdJeC 8DiYBhFPiIVivxHff50SssN8SRMoz87eQFQ7qy+LoHqnCuk2wRwtcUBeb qU08PXwidl0ufFEBA7P3KsV53f9dqFoeuxeV05TmAHQ0KSBnkI0RFqCW0 Q==; Received: from cisexcasmb01-2a.caci.com ([10.201.50.152]) by mailserver2.caci.com with ESMTP/TLS/AES256-SHA; 08 Aug 2019 00:12:05 -0400 Received: from CISEXCASMB02-2A.caci.com (10.201.50.154) by CISEXCASMB01-2a.caci.com (10.201.50.152) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 8 Aug 2019 00:12:05 -0400 Received: from CISEXCASMB02-2A.caci.com ([fe80::f116:6d04:460e:9018]) by CISEXCASMB02-2a.caci.com ([fe80::f116:6d04:460e:9018%12]) with mapi id 15.00.1395.000; Thu, 8 Aug 2019 00:12:05 -0400 From: "Howland, Craig D. - US via newlib" Reply-To: "Howland, Craig D. - US" To: "newlib@sourceware.org" Subject: Re: [PATCH v4 2/3] Add default implementation of fenv.h and all methods Date: Thu, 08 Aug 2019 04:12:00 -0000 Message-ID: <1565237528222.64280@caci.com> References: <1565194471-21861-1-git-send-email-joel@rtems.org> In-Reply-To: <1565194471-21861-1-git-send-email-joel@rtems.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2019/txt/msg00432.txt.bz2 I think I have identified all of the individual places where return values = should be 0 as Joseph Myers noted in general, as well as some other small i= tems. Craig > From: newlib-owner@sourceware.org on behalf= of Joel Sherrill > Sent: Wednesday, August 7, 2019 12:14 PM > To: newlib@sourceware.org > Cc: Joel Sherrill > Subject: [PATCH v4 2/3] Add default implementation of fenv.h and all meth= ods > > The default implementation of the fenv.h methods return > -EOPNOTSUPP. [typo:] -ENOTSUP > > The intention of the new fenv.h is that it be portable > and that architectures provide their own implementation > of sys/fenv.h. > --- > ... > diff --git a/newlib/libm/fenv/feclearexcept.c b/newlib/libm/fenv/fecleare= xcept.c > new file mode 100644 > +int feclearexcept(int excepts) > +{ > + return -ENOTSUP; return (excepts ? -ENOTSUP : 0); > ... > diff --git a/newlib/libm/fenv/fegetround.c b/newlib/libm/fenv/fegetround.c > ... > +FUNCTION > +<>---get current rounding direction > + > +INDEX > + feclearexcept [typo, not feclearexcept:] fegetround > +SYNOPSIS > + #include > + int fegetround(void); > + > + Link with -lm. > + > +DESCRIPTION > +This method returns the current rounding direction. > + > +RETURNS > +This method returns the rounding direction. If the current rounding > +direction cannot be determined, then a negative value is returned. [Small edit, pointing out macro value needed:] This method returns the rounding direction, corresponding to the value of the respective rounding macro. If the current rounding direction cannot be determined, then a negative value is returned. > ... > diff --git a/newlib/libm/fenv/feraiseexcept.c b/newlib/libm/fenv/feraisee= xcept.c > ... > +int feraiseexcept(int excepts) > +{ > + return -ENOTSUP; return (excepts ? -ENOTSUP : 0); > +} > ... > diff --git a/newlib/libm/fenv/fesetenv.c b/newlib/libm/fenv/fesetenv.c > ... > +SYNOPSIS > + #include > + int fesetenv(const fenv_t *[]); > + > + Link with -lm. > + > +DESCRIPTION > +This method attempts to establish the floating-point environment > +pointed to by <[envp]>. The argument [] must point to a > +floating-point environment obtained via <> or <> > +or a floating-point environment macro such as <>. [Add:] It only sets the states of the flags as recorded in its argument, and does not actually raise the associated floating-point exceptions. > ... > diff --git a/newlib/libm/fenv/fesetround.c b/newlib/libm/fenv/fesetround.c > ... > +SYNOPSIS > + #include > + int fesetround(int <[round]>); > + > + Link with -lm. > + > +DESCRIPTION > +This method attempts to set the current rounding direction represented > +by <[round]>. [Add:] <[round]> must be the value of one of the rounding-direction macros. > ... > diff --git a/newlib/libm/fenv/fetestexcept.c b/newlib/libm/fenv/fetestexc= ept.c > ... > +int fetestexcept(int excepts) > +{ > + return -ENOTSUP; return 0; > ...