On Sat, Dec 19, 2015 at 9:58 PM, James Almer <jamr...@gmail.com> wrote: > On 12/19/2015 11:34 PM, Ganesh Ajjanagadde wrote: >> + /* handle the nan case, but don't use isnan for max portability */ >> + else if (z != z) >> + return z; > > Didn't check, but this sounds like it would probably trigger warnings with > -Wtautological-compare (GCC 6). > That aside, libm.h has an isnan() fallback for systems where it's not > available. Portability shouldn't be a problem.
Yes, but then this will need to be placed below breaking the alphabetical order for minimal gain and I can't be as confident that it works. if (z != z) is perfectly valid C code that does its job. It is a reasonably common idiom for nan checks. I believe (have not confirmed) that even some libm's use it in some places. Lastly, I have tested with clang 3.7.0-6 (on Arch) with -Weverything. Only warning is for z == 0 test (Wfloat-equal). Anyway, this I am not as reluctant to change as compared to the licensing/copyright (wrt this patch). > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel