From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5599 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: C11 threads Date: Fri, 25 Jul 2014 12:14:49 -0400 Message-ID: <20140725161449.GD4038@brightrain.aerifal.cx> References: <1406282437.6438.34.camel@eris.loria.fr> <20140725104056.GO9928@port70.net> <1406286404.6438.38.camel@eris.loria.fr> <20140725130438.GA10402@port70.net> 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 1406304908 4421 80.91.229.3 (25 Jul 2014 16:15:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jul 2014 16:15:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5604-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jul 25 18:15:03 2014 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 1XAi98-00031Z-WA for gllmg-musl@plane.gmane.org; Fri, 25 Jul 2014 18:15:03 +0200 Original-Received: (qmail 14136 invoked by uid 550); 25 Jul 2014 16:15:02 -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 14128 invoked from network); 25 Jul 2014 16:15:01 -0000 Content-Disposition: inline In-Reply-To: <20140725130438.GA10402@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5599 Archived-At: On Fri, Jul 25, 2014 at 03:04:39PM +0200, Szabolcs Nagy wrote: > > The term "inequal function pointer" had nothing pop up. Could you give > > a reference to the relevant part in POSIX that makes the requirement > > for a "strong" symbol? > > > hm i might be wrong: > > there is a requirement in c and posix that the address of a > standard function can be taken and that == is only true for > function pointers if they point to the same function > > but i don't see any requirement that each library function > must be distinct > > and there is a dr that implies the opposite: > > http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_078.html > > without explanation the response says h can return 0. Indeed there is no explanation. I don't think it could be related to macros because my understanding is that only function-like macros are allowed for the standard functions, i.e. you can override such macros by using (). Both C99 and C11 contain in 7.1.4 paragraph 1 a footnote (161 or 185, respectively) reading: "This means that an implementation shall provide an actual function for each library function, even if it also provides a macro for that function." This suggests to me that there should be a one-to-one correspondence between actual functions and library functions, but maybe I'm reading too much into it. > the musl math library currently defines distinct long double > functions even if long double and double have the same > representation, they could be weak aliases if the standard > allows this.. Indeed. If this issue is resolved to allow it, I think we should make this change and remove some otherwise-useless bloat. Rich