From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18584 invoked by alias); 1 May 2012 20:16:21 -0000 Received: (qmail 18569 invoked by uid 22791); 1 May 2012 20:16:19 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SUBJ_OBFU_PUNCT_FEW,SUBJ_OBFU_PUNCT_MANY X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 May 2012 20:16:05 +0000 From: "skunk at iskunk dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/53179] New: fixinclude needed for pthread.h on AIX 5.3 (PTHREAD_ONCE_INIT) Date: Tue, 01 May 2012 20:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: skunk at iskunk dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg00024.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: skunk@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_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.