mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-25 03:44:04 +08:00
c-common.c (decl_attributes): Differentiate between types and type decls for alignment.
* c-common.c (decl_attributes): Differentiate between types and type decls for alignment. From-SVN: r34810
This commit is contained in:
parent
45f640c2f1
commit
af80d48991
@ -1,3 +1,8 @@
|
||||
2000-06-30 Catherine Moore <clm@cygnus.com>
|
||||
|
||||
* c-common.c (decl_attributes): Differentiate between
|
||||
types and type decls for alignment.
|
||||
|
||||
2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* cpp.texi: Document #pragma GCC dependency
|
||||
|
@ -779,8 +779,16 @@ decl_attributes (node, attributes, prefix_attributes)
|
||||
error ("requested alignment is too large");
|
||||
else if (is_type)
|
||||
{
|
||||
TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
|
||||
TYPE_USER_ALIGN (type) = 1;
|
||||
if (decl)
|
||||
{
|
||||
DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT;
|
||||
DECL_USER_ALIGN (decl) = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
TYPE_ALIGN (type) = (1 << i) * BITS_PER_UNIT;
|
||||
TYPE_USER_ALIGN (type) = 1;
|
||||
}
|
||||
}
|
||||
else if (TREE_CODE (decl) != VAR_DECL
|
||||
&& TREE_CODE (decl) != FIELD_DECL)
|
||||
|
Loading…
Reference in New Issue
Block a user