Commit 6cc430c1 by Eric Botcazou Committed by Eric Botcazou

c-ada-spec.c (get_underlying_decl): Get to the main type variant.

	* c-ada-spec.c (get_underlying_decl): Get to the main type variant.
	(dump_ada_node): Add const keyword.

From-SVN: r264738
parent e04108c7
2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (get_underlying_decl): Get to the main type variant.
(dump_ada_node): Add const keyword.
2018-09-25 Martin Liska <mliska@suse.cz>
* c-common.c (c_common_truthvalue_conversion):
......
......@@ -1020,13 +1020,18 @@ get_underlying_decl (tree type)
if (DECL_P (type))
return type;
/* type is a typedef. */
if (TYPE_P (type) && TYPE_NAME (type) && DECL_P (TYPE_NAME (type)))
return TYPE_NAME (type);
if (TYPE_P (type))
{
type = TYPE_MAIN_VARIANT (type);
/* type is a typedef. */
if (TYPE_NAME (type) && DECL_P (TYPE_NAME (type)))
return TYPE_NAME (type);
/* TYPE_STUB_DECL has been set for type. */
if (TYPE_P (type) && TYPE_STUB_DECL (type))
return TYPE_STUB_DECL (type);
/* TYPE_STUB_DECL has been set for type. */
if (TYPE_STUB_DECL (type))
return TYPE_STUB_DECL (type);
}
return NULL_TREE;
}
......@@ -2143,8 +2148,8 @@ dump_ada_node (pretty_printer *buffer, tree node, tree type, int spc,
}
else
{
const unsigned int quals = TYPE_QUALS (TREE_TYPE (node));
bool is_access = false;
unsigned int quals = TYPE_QUALS (TREE_TYPE (node));
if (VOID_TYPE_P (TREE_TYPE (node)))
{
......
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