Bug 2749

Summary: gcc -c -O2 -ansi -pedantic -D_GNU_SOURCE foo.c fails
Product: [Retired] Red Hat Linux Reporter: mdaum
Component: glibcAssignee: Cristian Gafton <gafton>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-07-28 05:18:22 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:

Description mdaum 1999-05-11 23:39:24 UTC
gcc -c -O2 -pedantic -D_GNU_SOURCE foo.c will fail in
/usr/include/bits/mathinline.h if math.h is included.
Compiler output follows:

/usr/include/bits/mathinline.h:117: warning: ANSI C forbids
specifying structure member to initialize
/usr/include/bits/mathinline.h:117: initializer element for
`__u.__f' is not computable at load time
/usr/include/bits/mathinline.h: In function `__signbit':
/usr/include/bits/mathinline.h:122: warning: ANSI C forbids
specifying structure member to initialize
/usr/include/bits/mathinline.h:122: initializer element for
`__u.__d' is not computable at load time
/usr/include/bits/mathinline.h: In function `__signbitl':
/usr/include/bits/mathinline.h:127: warning: ANSI C forbids
specifying structure member to initialize
/usr/include/bits/mathinline.h:127: initializer element for
`__u.__l' is not computable at load time

Comment 1 Jim Kingdon 1999-07-24 16:49:59 UTC
I was able to reproduce this.  I would suggest fixing mathinline.h
so it uses an assignment like "__u.__f = __x" rather than an
initializer.
Alternately, use __extension__.

Comment 2 Cristian Gafton 1999-07-28 05:18:59 UTC
glibc headers are not happy with the -pedantic or -traditional. POSIX
specs are making it nearly impossible.