Date: Sat, 7 Sep 2013 16:50:11 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Subject: Re: Third draft of musl documentation/manual * Rich Felker <dalias@...ifal.cx> [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 :)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.