summaryrefslogtreecommitdiff
path: root/gcc/common.opt
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-03 17:22:40 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-03 17:22:40 +0000
commit6b5553e50fff7ad0835e807fc006c0bcfe1816f7 (patch)
tree63c3bd6632b4fa9e9fe6de7b0c1e6e63755301d5 /gcc/common.opt
parent243f8437f36d761c9a80748f73e3830bb881d6f8 (diff)
downloadgcc-6b5553e50fff7ad0835e807fc006c0bcfe1816f7.tar.gz
PR c/7054
* defaults.h (TARGET_DEFAULT_PACK_STRUCT): Provide default. * tree.h (initial_max_fld_align): Declare * stor-layout.c (initial_max_fld_align): Define and initialize. (maximum_field_alignment): Initialize to the same value. * common.opt: Add -fpack-struct= variant of switch. * opts.c: Handle -fpack-struct= variant of switch. * c-pragma.c: Change #pragma pack() handling so that it becomes compatible to other compilers: accept individual 'push' argument, make final pop restore (command line) default, correct interaction of push/pop and sole specification of a new alignment (so that the sequence #pragma pack(push) - #pragma pack(<n>) becomes identical to #pragma pack(push, <n>). * doc/extend.texi: New node "Structure-Packing Pragmas" under "Pragmas", describing #pragma pack. * doc/invoke.texi: Document -fpack-struct=<n> variant of switch. * doc/tm.texi: Adjust description for HANDLE_PRAGMA_PACK_PUSH_POP. Document new TARGET_DEFAULT_PACK_STRUCT. testsuite: * gcc.dg/pack-test-2.c: Adjust to permit and check #pragma pack(push). * gcc.dg/c99-flex-array-4.c: Add -fpack-struct=8 to provide a deterministic starting point for the alignment of structure fields. * gcc.dg/Wpadded.c: Dito. * g++.dg/abi/vbase10.C: Dito. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87037 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/common.opt')
-rw-r--r--gcc/common.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/common.opt b/gcc/common.opt
index c3baf31f484..a74921df92a 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -575,6 +575,10 @@ fpack-struct
Common Report Var(flag_pack_struct)
Pack structure members together without holes
+fpack-struct=
+Common RejectNegative Joined UInteger
+-fpack-struct=<number> Set initial maximum structure member alignment
+
fpcc-struct-return
Common Report Var(flag_pcc_struct_return,1) VarExists
Return small aggregates in memory, not registers