Bug 2749 - gcc -c -O2 -ansi -pedantic -D_GNU_SOURCE foo.c fails
gcc -c -O2 -ansi -pedantic -D_GNU_SOURCE foo.c fails
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-11 19:39 EDT by mdaum
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-07-28 01:18:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description mdaum 1999-05-11 19:39:24 EDT
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 12:49:59 EDT
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 01:18:59 EDT
glibc headers are not happy with the -pedantic or -traditional. POSIX
specs are making it nearly impossible.

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