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]

[Ada] Add missing size check


I applied the following for Richard. -Geert

2001-10-10  Richard Kenner <kenner@gnat.com>

	* decl.c: (validate_size): Do check size of object of integral type 
	if it is a packed array type.

*** decl.c	2001/10/04 20:22:57	1.5
--- decl.c	2001/10/06 12:58:02	1.6
*************** validate_size (uint_size, gnu_type, gnat
*** 5516,5522 ****
       need not do it here (which would entail checking against the bounds).
       However, if this is an aliased object, it may not be smaller than the
       type of the object.  */
!   if (INTEGRAL_TYPE_P (gnu_type)
        && ! (kind == VAR_DECL && Is_Aliased (gnat_object)))
      return size;
  
--- 5516,5522 ----
       need not do it here (which would entail checking against the bounds).
       However, if this is an aliased object, it may not be smaller than the
       type of the object.  */
!   if (INTEGRAL_TYPE_P (gnu_type) && ! TYPE_PACKED_ARRAY_TYPE_P (gnu_type)
        && ! (kind == VAR_DECL && Is_Aliased (gnat_object)))
      return size;
  



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