From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31373 invoked by alias); 23 Jun 2014 15:48:43 -0000 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 Received: (qmail 30744 invoked by uid 48); 23 Jun 2014 15:48:37 -0000 From: "alex.wolf at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug objc/50909] Process "#pragma options align=reset" correctly on Mac OS X Date: Mon, 23 Jun 2014 15:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: objc X-Bugzilla-Version: 4.6.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: alex.wolf at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01794.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909 --- Comment #8 from Alex --- I am writing cross platform code with some platform specific USB enumeration functionality. IOKit was just what I needed on the mac, libudev on linux. I inevitably stumbled over this issue when trying to compile the mac portion. I think it would be sad if gcc wouldn't support these deviations from the standard in the future, considering anybody trying to use IOKit with gcc will come across this "bug". Are you saying I should not use gcc on a mac with IOKit? If I should, then gcc should not give me such an error. It is easy to work around but why punish the developer when Apple wrote the non-compliant header that IOKit users must include. I think this is a clear case where gcc could & should change its leniency for the sake of its developers. Or, am I supposed to write my own USB library from the ground up for mac just because the pragmas aren't supported? I "fixed" my setup without recompiling gcc: I made a backup of USB.h and then changed all occurrences of #pragma options align=reset to #pragma pack() which seemed to compile and run. As to someone implementing clang behavior: I was under the impression that the attached patch just needed to be applied? That is why I was inquiring as to why nobody had applied it after 3 years.