From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10089 Path: news.gmane.org!not-for-mail From: Masanori Ogino Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [PATCH v2] Add stdc-predef.h. Date: Sat, 4 Jun 2016 13:19:47 +0900 Message-ID: References: <1459823023-5951-1-git-send-email-masanori.ogino@gmail.com> <20160603190453.GP10893@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465014071 6441 80.91.229.3 (4 Jun 2016 04:21:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2016 04:21:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10102-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jun 04 06:21:11 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1b9348-0007xG-Ix for gllmg-musl@m.gmane.org; Sat, 04 Jun 2016 06:20:04 +0200 Original-Received: (qmail 24304 invoked by uid 550); 4 Jun 2016 04:20:01 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 24283 invoked from network); 4 Jun 2016 04:20:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-transfer-encoding; bh=VDTszeWHyV46Wkdd86sXGfYAkEAtIgF/K7+o9Tm3UyA=; b=NV5P3yF7zRNFGotIyKOWkQJIsQhSD73aIMeCwy1FvF8VHWu4pryHvf3wZjLiMi77UD uzvB/X7lrcmrcyEg/o7gM0DqwgsAiPDa7zj237uck5x6IlwHp3KA3gdz1CPyyE5Ng6ou 6AOBaGCHhplg6sE9fx7wZUFqjs45b8M1idxZ6j+aSTeyLvrmy10hNDvX1BoS9e6wwFvS pRCAsmYXZ7uSEDVPQSgxb8BtesHlMY9WMvTB6Nq7fidHr8+9L3/ij1cH94/zUn8VxyRA Un1nhWArcJs2z7QmOKukqBtBYYgRA4+azNbaYsqq6U6UxKnEOJF0p8OxqvXlKVrzc8Mz SE+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-transfer-encoding; bh=VDTszeWHyV46Wkdd86sXGfYAkEAtIgF/K7+o9Tm3UyA=; b=Yc/xl3dVhUfFWm/HpUZSon4cibUXAeXqf1+gGEqo9PdU/nFtHZZ+l+onFgpxWd0c3q SwRrz8EqECJws1MOHe9Cs63JqTKWoNGIInJ3vArGo6GrtiBV6/vOnIPpqptg8e4bx+85 MNbQyN0mRmZ56qvzTuz4QPetcY1uu/dLHGQLeJDfg94HNdxXzln8vjuDXm1jlKQ+5s48 3VUipfO1S/Y4Hcp5GiEw1MA29j7fdq1gg3Gy2liN63XuGrcxwx0AkvRtWq4kvzcLvzFV Hlh3a1uITFjdRHSW34qsYiysZVW9QKfPvlakcQsBu5EOKscCNq7t6HxIlD8ETvT8IbXR 8VQg== X-Gm-Message-State: ALyK8tJ9LG13dTsLOkRswIF/cjm1BhcNyJLszAp1uG6Xm4yhFxDRIHzecT5vwdEJjOeSZHSzdINq2vsDjtRB1g== X-Received: by 10.157.42.14 with SMTP id t14mr3958756ota.94.1465013988763; Fri, 03 Jun 2016 21:19:48 -0700 (PDT) Original-Sender: masanoriogino@gmail.com In-Reply-To: <20160603190453.GP10893@brightrain.aerifal.cx> X-Google-Sender-Auth: ZxZxGNPCSCu3fCz_cqlQe6hVDEI Xref: news.gmane.org gmane.linux.lib.musl.general:10089 Archived-At: Hello, 2016-06-04 4:04 GMT+09:00 Rich Felker : > On Wed, Jun 01, 2016 at 08:21:17AM +0000, Masanori Ogino wrote: >> 2016=E5=B9=B44=E6=9C=885=E6=97=A5(=E7=81=AB) 11:23 Masanori Ogino : >> >> > Note that GCC does not support the "Annex G" complex arithmetic even >> > though __GCC_IEC_559_COMPLEX is defined. Thus, we leave >> > __STDC_IEC_559_COMPLEX__ undefined for now. >> > >> > Reference: http://www.openwall.com/lists/musl/2016/03/31/2 >> > >> > Signed-off-by: Masanori Ogino >> > --- >> > include/stdc-predef.h | 11 +++++++++++ >> > 1 file changed, 11 insertions(+) >> > create mode 100644 include/stdc-predef.h >> > >> > diff --git a/include/stdc-predef.h b/include/stdc-predef.h >> > new file mode 100644 >> > index 0000000..baa8a54 >> > --- /dev/null >> > +++ b/include/stdc-predef.h >> > @@ -0,0 +1,11 @@ >> > +#ifndef _STDC_PREDEF_H >> > +#define _STDC_PREDEF_H >> > + >> > +/* ISO/IEC 10646:2012, equivalent to Unicode 6.1 */ >> > +#define __STDC_ISO_10646__ 201206L >> > + >> > +#if __GCC_IEC_559 > 0 >> > +#define __STDC_IEC_559__ 1 >> > +#endif >> > + >> > +#endif >> > -- >> > 2.7.3 >> > >> > >> ping? > > I've actually had my own version of this pending for a long time now, > so let's discuss it. My version was: > > #ifndef _STDC_PREDEF_H > #define _STDC_PREDEF_H > > #define __STDC_ISO_10646__ 201103L > #define __STDC_UTF_16__ 1 > #define __STDC_UTF_32__ 1 > #define __STDC_IEC_559__ 1 > #define __STDC_NO_ATOMICS__ 1 > > #endif > > Obviously my Unicode date is older -- I haven't checked which is more > correct, but after the next release we should update to latest Unicode > anyway. Sure. By the way, is there any automation script to update them using the Unicode database? I couldn't find that. > Other than that, I also made explicit the UTF-16/32 macros > that maybe should have been left to the compiler, and defined > __STDC_NO_ATOMICS__ which is probably a bad idea since we might or > might not support stdatomic.h depending on whether a compiler-provided > or valid third-party version is available and working. Agreed. > The biggest question I think is what to do with __STDC_IEC_559__. My > intent has always been to "support Annex F" and I think we do that for > archs with hard float, but the lack of exceptions and rounding modes > might be a conformance gap for soft-float archs. Your use of > __GCC_IEC_559 gets around that, but fails to produce the desired value > for (maybe hypothetical?) non-GCC compilers that don't define the gcc > macro. It might be better to do something like: > > #if !defined(__GCC_IEC_559) || __GCC_IEC_559 > 0 > #define __STDC_IEC_559__ 1 > #endif > > What do you think? Anyone else have thoughts on the matter? > Well, is there any compiler that does not define __GCC_IEC_559 but uses stdc-predef.h? > Rich --=20 Masanori Ogino