This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/28679] New: #pragma pack(push) malformed
- From: "cbowler at ca dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2006 12:46:15 -0000
- Subject: [Bug c/28679] New: #pragma pack(push) malformed
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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