Bug 202900 - nearbyint() not declared in <math.h>
Summary: nearbyint() not declared in <math.h>
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-16 23:28 UTC by Stephen Rasku
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-17 07:04:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Stephen Rasku 2006-08-16 23:28:29 UTC
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.

Comment 1 Jakub Jelinek 2006-08-17 07:04:42 UTC
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.



Note You need to log in before you can comment on or make changes to this bug.