aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-ada-spec.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-11-13 17:37:35 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-11-13 17:37:35 +0000
commit4be719cdc2bc900370de83e1cce1f3c7eb4a8ba6 (patch)
tree3537b60c1c3fed6aaa55f61e5a866f181e9baa4c /gcc/c-family/c-ada-spec.c
parent4ebd491f2aed6d174c976f07d67c4b957f71391d (diff)
downloadgcc-4be719cdc2bc900370de83e1cce1f3c7eb4a8ba6.zip
gcc-4be719cdc2bc900370de83e1cce1f3c7eb4a8ba6.tar.gz
gcc-4be719cdc2bc900370de83e1cce1f3c7eb4a8ba6.tar.bz2
c-ada-spec.c (print_ada_declaration): For typedef declarations...
* c-ada-spec.c (print_ada_declaration): For typedef declarations, look for nested types only if the type is a record or union and dump SLOC. From-SVN: r242356
Diffstat (limited to 'gcc/c-family/c-ada-spec.c')
-rw-r--r--gcc/c-family/c-ada-spec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index a5395b6..42a2cd3 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -2813,7 +2813,7 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
}
else
{
- if (!TREE_VISITED (stub)
+ if (RECORD_OR_UNION_TYPE_P (typ)
&& DECL_SOURCE_FILE (stub) == source_file_base)
dump_nested_types (buffer, stub, stub, true, spc);
@@ -2821,7 +2821,8 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
dump_generic_ada_node (buffer, t, type, spc, false, true);
pp_string (buffer, " is ");
dump_generic_ada_node (buffer, typ, type, spc, false, true);
- pp_semicolon (buffer);
+ pp_string (buffer, "; -- ");
+ dump_sloc (buffer, t);
}
TREE_VISITED (t) = 1;