aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-03-05 12:40:53 +0100
committerEric Botcazou <ebotcazou@adacore.com>2021-03-05 12:47:28 +0100
commite51f67c155c0157df07e7d38daac917f06931220 (patch)
tree4b38d9046462caf63ebaab35cdbe96591429f62f
parent28354bc22bd66648891a875ee08ca2b27debf2a2 (diff)
downloadgcc-e51f67c155c0157df07e7d38daac917f06931220.zip
gcc-e51f67c155c0157df07e7d38daac917f06931220.tar.gz
gcc-e51f67c155c0157df07e7d38daac917f06931220.tar.bz2
Fix oversight in support for forward declarations
gcc/c-family/ * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types after entering the separate class package, if any.
-rw-r--r--gcc/c-family/c-ada-spec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index bc0aa5e..dd8e8bb 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -2847,8 +2847,6 @@ dump_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
pp_string (buffer, "subtype ");
else
{
- dump_nested_types (buffer, t, spc);
-
if (separate_class_package (t))
{
is_class = true;
@@ -2859,6 +2857,8 @@ dump_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
newline_and_indent (buffer, spc);
}
+ dump_nested_types (buffer, t, spc);
+
pp_string (buffer, "type ");
}
break;