This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/28679] New: #pragma pack(push) malformed


5.47.6 Structure-Packing Pragmas

3. #pragma pack(push[,n]) pushes the current alignment setting on an internal
stack and then optionally sets the new alignment.

t.c:
#pragma pack(1)
#pragma pack(push)

gcc t.c
t.c:2: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

It appears #pragma pack(push) is not supported as the documention suggests.  

Also, the error message indicates there is an undocumented form or #pragma pack
that takes a stack identifier.  I've been poking around to understand how it
works but I'm not sure what #pragma pack(pop) does.  It appears to pop all
stacks, but what packing is set afterwards if multiple stacks are popped?


-- 
           Summary: #pragma pack(push) malformed
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cbowler at ca dot ibm dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28679


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]