long double (was "strtold?")
Jeff Johnston
jjohnstn@redhat.com
Sat Mar 28 01:13:00 GMT 2009
Ken Werner wrote:
> On Wednesday 25 March 2009 16:58:48 Ken Werner wrote:
>
>> Hi,
>>
>> The attached patch uses __asm__ () instead of asm () to map the long double
>> functions as this doesn't pollute the name space and prevents compiler
>> errors, e.g. if build with -std=c99.
>>
>> This patch has also being discussed as part of another thread starting
>> with: http://sourceware.org/ml/newlib/2009/msg00303.html.
>>
>> Regards
>> Ken
>>
>
> Hi,
>
> Because of the recent changes to math.h I re-based my patch.
> Are there any objections or is it ok to apply?
>
> Thanks
> Ken
>
>
My apologies for the delay in reviewing this. According to the gcc info:
********************************************************************************
You can specify the name to be used in the assembler code for a C
function or variable by writing the `asm' (or `__asm__') keyword after
the declarator as follows:
int foo asm ("myfoo") = 2;
This specifies that the name to be used for the variable `foo' in the
assembler code should be `myfoo' rather than the usual `_foo'.
On systems where an underscore is normally prepended to the name of a C
function or variable, this feature allows you to define names for the
linker that do not start with an underscore.
********************************************************************************
If the platform normally prepends an underscore to a C function, you are
not going to call
the correct C math functions and the linker is going to fail. Feel free
to correct me if I have misinterpreted
this.
Thus, I would like to see this implemented as it is done for
DOUBLE_IS32BITS. The functions
are declared and implemented as calls to the double versions with casts.
-- Jeff J.
More information about the Newlib
mailing list