[m-rev.] diff: speed up is_finite/1 and is_nan/1 in C grades

Julien Fischer jfischer at opturion.com
Tue Sep 23 17:24:32 AEST 2014


On Fri, 19 Sep 2014, Julien Fischer wrote:

>
> On Fri, 19 Sep 2014, Julien Fischer wrote:
>
>>> float.m: In function ‘float_module22’:
>>> float.m:718:5: warning: implicit declaration of function ‘isinf’ 
>>> [-Wimplicit-function-declaration]
>>> float.m: In function ‘float_module23’:
>>> float.m:680:5: warning: implicit declaration of function ‘isnan’ 
>>> [-Wimplicit-function-declaration]
>>> float.m: In function ‘float_module26’:
>>> float.m:753:5: warning: implicit declaration of function ‘finite’ 
>>> [-Wimplicit-function-declaration]
>>> 
>>> Not sure what the fix should be.
>> 
>> The immediate fix is to only use the macro versions if we are using C99.
>
> I've committed the following which implements the immediate fix
> described above.  I look into disabling the use of -ansi with GCC by
> default separately.

I've also done the latter.  The only remaining issue with this change
is that we may not be getting the macro versions with MSVC 2013.
(I'm not sure if that defines __STDC_VERSION__ appropriately, or indeed
at all.)

Cheers,
Julien.


More information about the reviews mailing list