public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/50909] New: Process "#pragma options align=reset" correctly on Mac OS X
@ 2011-10-29  5:03 carsomyr at gmail dot com
  2012-05-23 21:35 ` [Bug objc/50909] " carl at lytro dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: carsomyr at gmail dot com @ 2011-10-29  5:03 UTC (permalink / raw)
  To: gcc-bugs

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 <IOKit/usb/USB.h>

  #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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-10-25 11:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-29  5:03 [Bug objc/50909] New: Process "#pragma options align=reset" correctly on Mac OS X carsomyr at gmail dot com
2012-05-23 21:35 ` [Bug objc/50909] " carl at lytro dot com
2012-08-08  8:26 ` roman at qubyx dot com
2013-09-13 18:53 ` dc7000 at att dot com
2013-09-13 19:05 ` dominiq at lps dot ens.fr
2013-09-13 20:32 ` dc7000 at att dot com
2014-06-23 14:52 ` dominiq at lps dot ens.fr
2014-06-23 15:48 ` alex.wolf at gmail dot com
2014-06-23 16:30 ` manu at gcc dot gnu.org
2021-10-25 11:01 ` emmiller at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).