Bug 2749 - gcc -c -O2 -ansi -pedantic -D_GNU_SOURCE foo.c fails
Summary: gcc -c -O2 -ansi -pedantic -D_GNU_SOURCE foo.c fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-05-11 23:39 UTC by mdaum
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-07-28 05:18:22 UTC
Embargoed:


Attachments (Terms of Use)

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.


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