Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 25 Jul 2014 09:42:52 -0400
From: Morten Welinder <mwelinder@...il.com>
To: musl@...ts.openwall.com
Subject: Re: C11 threads

> the musl math library currently defines distinct long double [...]

You cannot compare a "double" function pointer to a "long double"
function pointer.  The types are incompatible, even if they have the
same representation.

Hence I don't believe a C program can even tell if they are the same.

M.





On Fri, Jul 25, 2014 at 9:04 AM, Szabolcs Nagy <nsz@...t70.net> wrote:
> * Jens Gustedt <jens.gustedt@...ia.fr> [2014-07-25 13:06:44 +0200]:
>> Am Freitag, den 25.07.2014, 12:40 +0200 schrieb Szabolcs Nagy:
>> > * Jens Gustedt <jens.gustedt@...ia.fr> [2014-07-25 12:00:37 +0200]:
>> > > /* Best of all worlds, these are just weak aliases */
>> > > int cnd_broadcast(cnd_t *);                   // pthread_cond_broadcast
>> >
>> > posix is not yet aligned with c11, but i think they will
>> > require inequal function pointers for these functions
>>
>> 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.
>
> 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..

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.