Bug 61316

Summary: possible bug in math.h when using __USE_ISOC99
Product: [Retired] Red Hat Linux Reporter: Need Real Name <nbock>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: fweimer
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-17 17:33:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for math.h none

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.