This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Remove obsolete warning in gigi


Tested on x86_64-suse-linux, applied on the mainline.


2010-04-17  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
	issue warning.


-- 
Eric Botcazou
Index: gcc-interface/utils2.c
===================================================================
--- gcc-interface/utils2.c	(revision 158466)
+++ gcc-interface/utils2.c	(working copy)
@@ -1080,9 +1080,8 @@ build_unary_op (enum tree_code op_code,
 	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,
 	      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));
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]