VLC is compiled with -ffast-math but uses NaN
VLC's configure script enables -ffast-math if the compiler understands it, which implies -ffinite-math-only according to the GCC 6 docs. -ffinite-math-only means that the compiler can assume floating-point values are never NaN or infinite. However, VLC does actually use NaN in a few places -- try grepping the source for isnan.
I spotted this because I've just built VLC 2.2.3 with GCC 6.1, and test_libvlc_equalizer fails when checking that libvlc_audio_equalizer_get_amp_at_index returns NaN for silly band values.
Here's a simpler demonstration:
$ cat erm.c
#include <math.h>
#include <stdio.h>
int main() {
if (isnan(nanf(""))) printf("yes\n");
float f = nanf("");
if (isnan(f)) printf("still yes\n");
return 0;
}
$ gcc -O1 -o erm erm.c && ./erm
yes
still yes
$ gcc -O1 -ffast-math -o erm erm.c && ./erm
yes
$