From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94310 invoked by alias); 7 Aug 2019 08:36:38 -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 94299 invoked by uid 89); 7 Aug 2019 08:36:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=letter 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; Wed, 07 Aug 2019 08:36:36 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AFE62C00A166; Wed, 7 Aug 2019 08:36:35 +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 7B0705D9E1; Wed, 7 Aug 2019 08:36:35 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 278EDA806B8; Wed, 7 Aug 2019 10:36:34 +0200 (CEST) Date: Wed, 07 Aug 2019 08:36:00 -0000 From: Corinna Vinschen To: Joel Sherrill Cc: newlib@sourceware.org Subject: Re: [PATCH v3 2/3] Add default implementation of fenv.h and all methods Message-ID: <20190807083634.GA11632@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: Joel Sherrill , newlib@sourceware.org References: <1565118798-16391-1-git-send-email-joel@rtems.org> <1565118798-16391-3-git-send-email-joel@rtems.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3dbUQUznexwzCA76" Content-Disposition: inline In-Reply-To: <1565118798-16391-3-git-send-email-joel@rtems.org> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019/txt/msg00422.txt.bz2 --3dbUQUznexwzCA76 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1665 Hi Joel, On Aug 6 14:13, Joel Sherrill wrote: > [...] > +//#define FE_DIVBYZERO 0x00000001 > +//#define FE_INEXACT 0x00000002 > +//#define FE_INVALID 0x00000004 > +//#define FE_OVERFLOW 0x00000008 > +//#define FE_UNDERFLOW 0x00000010 > + > +//#define FE_ALL_EXCEPT \ > + //(FE_DIVBYZERO|FE_INEXACT|FE_INVALID|FE_OVERFLOW|FE_UNDERFLOW) > +#define FE_ALL_EXCEPT 0 /* NONE SUPPORTED IN PLACEHOLDER TEMPLATE */ > + > +/* > + * The following macros are to be defined if the respective rounding > + * direction is supported by the implementation via the fegetround() and > + * fesetround() functions, each with a unique positive value. > + * > + * FE_DOWNWARD > + * FE_TONEAREST > + * FE_TOWARDZERO > + * FE_UPWARD > + * > + * Other implementation-specific rounding modes may be defined, and must= start > + * with FE_ followed by a capital letter. > + */ > +//#define FE_DOWNWARD 1 > +//#define FE_TONEAREST 2 > +//#define FE_TOWARDZERO 3 > +//#define FE_UPWARD 4 > + > +/* > + * The following typedefs are required. See the C and POSIX standards for > + * details: > + * > + * fenv_t > + * fexcept_t > + */ > +typedef size_t fenv_t; > +typedef size_t fexcept_t; While these types are defined, the above macros are not. Wouldn't it make sense to define all or nothing by default? Additionally, the default type here should better be one of the predefined types like 'int' or 'unsigned int'. The target has to overwrite them anyway. Using a derived type like size_t could puzzle the developer into thinking there are minimum size requirements. The rest looks ok to me. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --3dbUQUznexwzCA76 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1KjZEACgkQ9TYGna5E T6B28RAAm60eP6xTtA+svIVzkoi5MlnFYyWcKZLsoY8aNAXYMQGENN1WN7QKb2TK 0dhbYJopBkWeFppZ+2pyAp+OvT1aOVI3oNA6llnrjzr4NLs2XckBq8Sku8kSpy6Q H5Nudz7GcW6t9cNlwNJgyb8HMPR4RD5loSkXvmcwwCuZYoY5zbvC4HZcv6BpZ7WD go3s56GPDwFLrGMAIllJQDH7zMeCcq0zJwgmE7Z60+HYy2p61TmyWKf1iX1DJuSl aCPKzZ2aGEzpkI3UrH0cDNTNGoHZ5cLpQxzPZ/HUreu/1JeTTwpZtI7wJVvC42pe LsHEjnqZL49pcnhNawozXe9rUeH+YxfYrzJNBQiSKu2xc43kISYW+nhJDJSR3OIH /+ouRLYdcjOzP0WNaglZa8Yt2ThgpsDbuDuJTXUXjkvGpHs6XbTPsFaGjtRV9Hg/ ReLBj/TfWymeceFLORf6W0RPi++lTE7i8ykpuNwpp7m7/PWDIFi3rKG/TUfgOCfX 1dln2quhOp53ZODLL8uuJmhG9Cmcm2A5KJQJ+ErDVrLj81lNE6j4Lw86hftoyz9i A+9eh+SmH2trwlH0p/Hpm4FOJI0xpjWEyTXt+wz0va0xkUuxLUscshU7wIvUHXTy Np8ekKK9h0r5hIX3M34OPp+xOJ2fNTOOBjMBuVzbZdTewzmzHEs= =ucQ4 -----END PGP SIGNATURE----- --3dbUQUznexwzCA76--