Commit a8fee948 by Richard Kenner Committed by Geert Bosch

decl.c: (validate_size): Do check size of object of integral type if...

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

From-SVN: r46162
parent 0a977123
2001-10-10 Richard Kenner <kenner@gnat.com> 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.
2001-10-10 Richard Kenner <kenner@gnat.com>
* decl.c: (gnat_to_gnu_entity, case object): Also materialize * decl.c: (gnat_to_gnu_entity, case object): Also materialize
VAR_DECL for constant if not Is_Public but -O0. VAR_DECL for constant if not Is_Public but -O0.
......
...@@ -5516,7 +5516,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok) ...@@ -5516,7 +5516,7 @@ validate_size (uint_size, gnu_type, gnat_object, kind, component_p, zero_ok)
need not do it here (which would entail checking against the bounds). 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 However, if this is an aliased object, it may not be smaller than the
type of the object. */ type of the object. */
if (INTEGRAL_TYPE_P (gnu_type) if (INTEGRAL_TYPE_P (gnu_type) && ! TYPE_PACKED_ARRAY_TYPE_P (gnu_type)
&& ! (kind == VAR_DECL && Is_Aliased (gnat_object))) && ! (kind == VAR_DECL && Is_Aliased (gnat_object)))
return size; return size;
......
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