Commit f5631ae6 by Eric Botcazou Committed by Eric Botcazou

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
parent b9175f57
2010-04-17 Eric Botcazou <ebotcazou@adacore.com> 2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
issue warning.
2010-04-17 Eric Botcazou <ebotcazou@adacore.com>
* uintp.h (UI_Lt): Declare. * uintp.h (UI_Lt): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size
computation in sizetype. computation in sizetype.
......
...@@ -1080,9 +1080,8 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) ...@@ -1080,9 +1080,8 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
case ARRAY_RANGE_REF: case ARRAY_RANGE_REF:
case COMPONENT_REF: case COMPONENT_REF:
case BIT_FIELD_REF: case BIT_FIELD_REF:
/* If this is for 'Address, find the address of the prefix and /* If this is for 'Address, find the address of the prefix and add
add the offset to the field. Otherwise, do this the normal the offset to the field. Otherwise, do this the normal way. */
way. */
if (op_code == ATTR_ADDR_EXPR) if (op_code == ATTR_ADDR_EXPR)
{ {
HOST_WIDE_INT bitsize; HOST_WIDE_INT bitsize;
...@@ -1109,11 +1108,6 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand) ...@@ -1109,11 +1108,6 @@ build_unary_op (enum tree_code op_code, tree result_type, tree operand)
if (!offset) if (!offset)
offset = size_zero_node; 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, offset = size_binop (PLUS_EXPR, offset,
size_int (bitpos / BITS_PER_UNIT)); size_int (bitpos / BITS_PER_UNIT));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment