aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils2.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-17 14:53:08 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-17 14:53:08 +0000
commitf5631ae6907cd200d8a9be082bf5450b1dfe52f9 (patch)
treef907e51ce1065e3646c8ceeeb7dea233040ca53f /gcc/ada/gcc-interface/utils2.c
parentb9175f57bab9376357b989889d0903d52301adcb (diff)
downloadgcc-f5631ae6907cd200d8a9be082bf5450b1dfe52f9.zip
gcc-f5631ae6907cd200d8a9be082bf5450b1dfe52f9.tar.gz
gcc-f5631ae6907cd200d8a9be082bf5450b1dfe52f9.tar.bz2
utils2.c (build_unary_op): Do not issue warning.
* gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not issue warning. From-SVN: r158469
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r--gcc/ada/gcc-interface/utils2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 31c5136..9b00c0d 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -1080,9 +1080,8 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
case ARRAY_RANGE_REF:
case COMPONENT_REF:
case BIT_FIELD_REF:
- /* If this is for 'Address, find the address of the prefix and
- add the offset to the field. Otherwise, do this the normal
- way. */
+ /* If this is for 'Address, find the address of the prefix and add
+ the offset to the field. Otherwise, do this the normal way. */
if (op_code == ATTR_ADDR_EXPR)
{
HOST_WIDE_INT bitsize;
@@ -1109,11 +1108,6 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
if (!offset)
offset = size_zero_node;
- if (bitpos % BITS_PER_UNIT != 0)
- post_error
- ("taking address of object not aligned on storage unit?",
- error_gnat_node);
-
offset = size_binop (PLUS_EXPR, offset,
size_int (bitpos / BITS_PER_UNIT));