https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909

--- Comment #8 from Alex <alex.wolf at gmail dot com> ---
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.

Reply via email to