I tried to look into the use of HUGE_VAL causing a "floating point constant exceeds range of 'double'" warning on OS X when a program is compiled with -pedantic<br><br>my first attempt at suppressing the warning was to cast HUGE_VAL to a double (it should already be a double anyway...) but that didn't work:<br>
<br><br>nofx:/tmp gbeane$ cat test.c<br>#include <math.h><br><br>int main (int argc, char **argv)<br>{<br><br> double d;<br><br> d = (double)HUGE_VAL;<br><br> return 0;<br><br>}<br>nofx:/tmp gbeane$ gcc -pedantic test.c <br>
test.c: In function 'main':<br>test.c:8: warning: floating constant exceeds range of 'double'<br><br><br>I filled out a bug report with Apple, but I can't imagine this will be a high priority for them. I do have some contacts there so maybe I can get it noticed... :)<br>
<br>Does anyone have any other ideas on how I can suppress this warning?<br>