From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7576 invoked by alias); 29 Oct 2011 05:03:14 -0000 Received: (qmail 7564 invoked by uid 22791); 29 Oct 2011 05:03:11 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BJ 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; Sat, 29 Oct 2011 05:02:57 +0000 From: "carsomyr at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug objc/50909] New: Process "#pragma options align=reset" correctly on Mac OS X Date: Sat, 29 Oct 2011 05:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: objc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carsomyr at gmail dot com 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: 2011-10/txt/msg03051.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909 Bug #: 50909 Summary: Process "#pragma options align=reset" correctly on Mac OS X Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: objc AssignedTo: unassigned@gcc.gnu.org ReportedBy: carsomyr@gmail.com Created attachment 25656 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25656 The patch. I recently discovered that this program #include #pragma pack(1) int main() { return 0; } #pragma options align=reset doesn't compile and gives the error too many #pragma options align=reset Notice that the program includes "IOKit/usb/USB.h". In that file, pragmas are used like: #pragma pack(1) ... #pragma options align=reset This gives the error because "#pragma pack(1)" is invisible to the relevant logic in "gcc/config/darwin-c.c". As such, I've attached a patch, "patch-pragmas.diff", that unifies said logic with the main pragma logic in "gcc/c-family/c-pragma.c". If the currently observed behavior for the test program is the intended behavior, please close this bug and ignore the patch.