http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53179
Bug #: 53179 Summary: fixinclude needed for pthread.h on AIX 5.3 (PTHREAD_ONCE_INIT) Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: sk...@iskunk.org Host: powerpc-ibm-aix5.3.0.0 Target: powerpc-ibm-aix5.3.0.0 Build: powerpc-ibm-aix5.3.0.0 Created attachment 27274 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27274 /usr/include/pthread.h from AIX 5.3 $ cat pth.c #include <pthread.h> pthread_once_t once = PTHREAD_ONCE_INIT; int main(void) { return 0; } $ OBJECT_MODE=32 gcc -W -Wall -c pth.c pth.c:3:1: warning: missing braces around initializer pth.c:3:1: warning: (near initialization for 'once.__on_word') $ gcc -maix64 -W -Wall -c pth.c pth.c:3:1: warning: missing braces around initializer pth.c:3:1: warning: (near initialization for 'once.__on_word') This is bad if you're building with -Werror. Inexplicably, both the 32- and 64-bit forms of the PTHREAD_ONCE_INIT initializer lack a pair of curly-braces. This despite other initializers in the same file having the same form, and the correct double-brace syntax. I am attaching a copy of both the original, unmodified pthread.h header, and my manually-fixed version.