Description of problem: The prototype for the function nearbyint() is not declared in <math.h> even though the man page says to #include this file for this function. If I use the function as documented I get: warning: implicit declaration of function `nearbyint' Version-Release number of selected component (if applicable): glibc-2.3.4-2.19 How reproducible: 100% Steps to Reproduce: 1. #include <math.h> 2. nearbyint(floatExpr); Actual results: See above. Expected results: Program should compile with no warnings.
Please read info libc 'Feature Test Macros' As nearbyint is only ISO C99 function, you need one of -std=c99, -std=gnu99, -D_ISOC99_SOURCE, -D_GNU_SOURCE or -D_XOPEN_SOURCE=600.