Bug 61316 - possible bug in math.h when using __USE_ISOC99
Summary: possible bug in math.h when using __USE_ISOC99
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-17 17:32 UTC by Need Real Name
Modified: 2016-11-24 15:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-03-17 17:33:19 UTC
Embargoed:


Attachments (Terms of Use)
patch for math.h (906 bytes, patch)
2002-03-17 17:33 UTC, Need Real Name
no flags Details | Diff

Description Need Real Name 2002-03-17 17:32:02 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311

Description of problem:
When using the __USE_ISOC99 macro with math.h the compiler throws an error.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.write c-program with

#define __USE_ISOC99
#include <math.h>

and compile.

2.compiler complains that

/usr/include/math.h:118:17: #if with no expression
/usr/include/math.h:354:17: #if with no expression

Comment 1 Need Real Name 2002-03-17 17:33:15 UTC
Created attachment 48804 [details]
patch for math.h

Comment 2 Jakub Jelinek 2002-03-17 19:10:51 UTC
That's no bug. You shouldn't define glibc's internal macros.
If you want ISO C99 functions, use either:
-std=c99
-D_ISOC99_SOURCE
-D__STDC_VERSION__=199901L
(in order of preference).
This is all documented in info libc and /usr/include/features.h too.


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