diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2004-08-31 22:46:31 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2004-08-31 18:46:31 -0400 |
commit | a4e9ffe59171f4ae43e329f0cc1dd919bac27226 (patch) | |
tree | 9be28897beaae19a44d2e62ed16af91e516683e6 /gcc/c-common.c | |
parent | 631b67ce1f819a4122eaf8b46f725dc5ff5ebd1d (diff) | |
download | gcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.zip gcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.tar.gz gcc-a4e9ffe59171f4ae43e329f0cc1dd919bac27226.tar.bz2 |
c-common.c (c_alignof_expr): Use DECL_ALIGN_UNIT and TYPE_ALIGN_UNIT.
* c-common.c (c_alignof_expr): Use DECL_ALIGN_UNIT and TYPE_ALIGN_UNIT.
(c_sizeof_of_alignof_type): Likewise.
* expr.c (array_ref_element_size): Likewise.
(highest_pow2_factor_for_target): Likewise.
* gimplify.c (canonicalize_addr_expr): Likewise.
(gimplify_compound_lval): Likewise.
* stor-layout.c (finalize_record_size, finalize_type_size): Likewise.
* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Likewise.
* varasm.c (assemble_variable): Likewise.
(output_constant_def_contents): Alignments are unsigned.
From-SVN: r86848
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index d3d0378..a47385b 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2774,7 +2774,7 @@ c_sizeof_or_alignof_type (tree type, enum tree_code op, int complain) size_int (TYPE_PRECISION (char_type_node) / BITS_PER_UNIT)); else - value = size_int (TYPE_ALIGN (type) / BITS_PER_UNIT); + value = size_int (TYPE_ALIGN_UNIT (type)); } /* VALUE will have an integer type with TYPE_IS_SIZETYPE set. @@ -2798,7 +2798,7 @@ c_alignof_expr (tree expr) tree t; if (TREE_CODE (expr) == VAR_DECL) - t = size_int (DECL_ALIGN (expr) / BITS_PER_UNIT); + t = size_int (DECL_ALIGN_UNIT (expr)); else if (TREE_CODE (expr) == COMPONENT_REF && DECL_C_BIT_FIELD (TREE_OPERAND (expr, 1))) @@ -2808,7 +2808,7 @@ c_alignof_expr (tree expr) } else if (TREE_CODE (expr) == COMPONENT_REF && TREE_CODE (TREE_OPERAND (expr, 1)) == FIELD_DECL) - t = size_int (DECL_ALIGN (TREE_OPERAND (expr, 1)) / BITS_PER_UNIT); + t = size_int (DECL_ALIGN_UNIT (TREE_OPERAND (expr, 1))); else if (TREE_CODE (expr) == INDIRECT_REF) { |