From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4021 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Third draft of musl documentation/manual Date: Sat, 7 Sep 2013 16:50:11 +0200 Message-ID: <20130907145010.GU5116@port70.net> References: <20130901044106.GA29630@brightrain.aerifal.cx> <20130906042043.GF20515@brightrain.aerifal.cx> <20130906151455.GS5116@port70.net> <20130906154730.GH20515@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1378565423 10316 80.91.229.3 (7 Sep 2013 14:50:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Sep 2013 14:50:23 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4025-gllmg-musl=m.gmane.org@lists.openwall.com Sat Sep 07 16:50:26 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VIJqD-0000Wb-BD for gllmg-musl@plane.gmane.org; Sat, 07 Sep 2013 16:50:25 +0200 Original-Received: (qmail 15459 invoked by uid 550); 7 Sep 2013 14:50:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15451 invoked from network); 7 Sep 2013 14:50:23 -0000 Content-Disposition: inline In-Reply-To: <20130906154730.GH20515@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4021 Archived-At: * Rich Felker [2013-09-06 11:47:30 -0400]: > > there is another minor c89 issue (at least in math.h): > > in c89 struct/union/array members cannot be initialized from a function > > argument directly and gcc warns about them with -ansi -pedantic > > (it also warns about long long so it's not a big deal, but i > > can fix this) > > Do you mean the initializers can't be non-constant-expressions? Or is > the issue more subtle? c89 3.5.7: "All the expressions in an initializer for an object that has static storage duration or in an initializer list for an object that has aggregate or union type shall be constant expressions." only -pedantic warns for this though (which also warns for long long unless __extension__ is used like in the glibc headers) > > NAN in math.h with fenv access support requires __builtin_nanf("") > > (in theory if fenv access is on then 0/0.0f raises the invalid > > flag at runtime except when used in static initializers) > > Use of __builtin_nanf("") is conditional on __GNUC__. By default, > 0.0f/0.0f is used. > > > for pedants stddef requires __builtin_offsetof > > This also has a non-__GNUC__ fallback, but it may fail to be a > constant expression, yielding slightly incorrect semantics. > my point was that the fallbacks are not strictly correct (but yes they work well enough in practice) > > > Adds everything above, plus interfaces modelef after GNU libc > > > > typo > > You're the third one to report it. :-) good, that means at least 3ppl read it thus far :)