aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2002-12-23 16:39:36 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-12-23 16:39:36 +0000
commit8dc65b6e6d423750c05dbe4e241556febf84dcca (patch)
tree159cad292d86d5201b0631ba807629fb2759076d /gcc/doc
parent7c02ae17fed20316d9790f679903b274f6abe77d (diff)
downloadgcc-8dc65b6e6d423750c05dbe4e241556febf84dcca.zip
gcc-8dc65b6e6d423750c05dbe4e241556febf84dcca.tar.gz
gcc-8dc65b6e6d423750c05dbe4e241556febf84dcca.tar.bz2
stor-layout.c (update_alignment_for_field): Correct handling of unnamed bitfields on PCC_BITFIELD_TYPE_MATTERS machines.
* stor-layout.c (update_alignment_for_field): Correct handling of unnamed bitfields on PCC_BITFIELD_TYPE_MATTERS machines. * doc/tm.texi (PCC_BITFIELD_TYPE_MATTERS): Note that an unnamed bitfield does not affect alignment. * testsuite/gcc.dg/i386-bitfield3.c: New test. From-SVN: r60439
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/tm.texi24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 496a4a2..8436e89 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -1181,17 +1181,19 @@ go slower in that case, define this macro as 0.
Define this if you wish to imitate the way many other C compilers handle
alignment of bit-fields and the structures that contain them.
-The behavior is that the type written for a bit-field (@code{int},
-@code{short}, or other integer type) imposes an alignment for the
-entire structure, as if the structure really did contain an ordinary
-field of that type. In addition, the bit-field is placed within the
-structure so that it would fit within such a field, not crossing a
-boundary for it.
-
-Thus, on most machines, a bit-field whose type is written as @code{int}
-would not cross a four-byte boundary, and would force four-byte
-alignment for the whole structure. (The alignment used may not be four
-bytes; it is controlled by the other alignment parameters.)
+The behavior is that the type written for a named bit-field (@code{int},
+@code{short}, or other integer type) imposes an alignment for the entire
+structure, as if the structure really did contain an ordinary field of
+that type. In addition, the bit-field is placed within the structure so
+that it would fit within such a field, not crossing a boundary for it.
+
+Thus, on most machines, a named bit-field whose type is written as
+@code{int} would not cross a four-byte boundary, and would force
+four-byte alignment for the whole structure. (The alignment used may
+not be four bytes; it is controlled by the other alignment parameters.)
+
+An unnamed bit-field will not affect the alignment of the containing
+structure.
If the macro is defined, its definition should be a C expression;
a nonzero value for the expression enables this behavior.