Small fix to implementation of -fdump-ada-spec

gcc/c-family/
	* c-ada-spec.cc (bitfield_used): Move around.
	(packed_layout): Likewise.
	(dump_ada_array_type): Do not put "aliased" for a packed layout.
This commit is contained in:
Eric Botcazou 2024-05-17 11:44:30 +02:00
parent 4da8be4f46
commit 6a0a46c579

View file

@ -699,6 +699,8 @@ compare_comment (const void *lp, const void *rp)
static tree *to_dump = NULL;
static int to_dump_count = 0;
static bool bitfield_used = false;
static bool packed_layout = false;
/* Collect a list of declarations from T relevant to SOURCE_FILE to be dumped
by a subsequent call to dump_ada_nodes. */
@ -1825,7 +1827,7 @@ dump_ada_array_type (pretty_printer *buffer, tree node, int spc)
pp_string (buffer, " of ");
if (TREE_CODE (tmp) != POINTER_TYPE)
if (TREE_CODE (tmp) != POINTER_TYPE && !packed_layout)
pp_string (buffer, "aliased ");
if (TYPE_NAME (tmp)
@ -2083,9 +2085,6 @@ is_float128 (tree node)
|| id_equal (name, "_Float128x");
}
static bool bitfield_used = false;
static bool packed_layout = false;
/* Recursively dump in BUFFER Ada declarations corresponding to NODE of type
TYPE. SPC is the indentation level. LIMITED_ACCESS indicates whether NODE
can be referenced via a "limited with" clause. NAME_ONLY indicates whether