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
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__.
glibc headers are not happy with the -pedantic or -traditional. POSIX specs are making it nearly impossible.