mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
4ebd491f2a
commit
4be719cdc2
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2016-11-09 Jason Merrill <jason@redhat.com>
|
2016-11-09 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
|
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
|
||||||
|
|
|
||||||
|
|
@ -2813,7 +2813,7 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!TREE_VISITED (stub)
|
if (RECORD_OR_UNION_TYPE_P (typ)
|
||||||
&& DECL_SOURCE_FILE (stub) == source_file_base)
|
&& DECL_SOURCE_FILE (stub) == source_file_base)
|
||||||
dump_nested_types (buffer, stub, stub, true, spc);
|
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);
|
dump_generic_ada_node (buffer, t, type, spc, false, true);
|
||||||
pp_string (buffer, " is ");
|
pp_string (buffer, " is ");
|
||||||
dump_generic_ada_node (buffer, typ, type, spc, false, true);
|
dump_generic_ada_node (buffer, typ, type, spc, false, true);
|
||||||
pp_semicolon (buffer);
|
pp_string (buffer, "; -- ");
|
||||||
|
dump_sloc (buffer, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
TREE_VISITED (t) = 1;
|
TREE_VISITED (t) = 1;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* c-c++-common/dump-ada-spec-6.c: New test.
|
||||||
|
|
||||||
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
|
2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gnat.dg/lto21.adb: New test.
|
* gnat.dg/lto21.adb: New test.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-fdump-ada-spec" } */
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
Zero
|
||||||
|
} MyEnum;
|
||||||
|
|
||||||
|
typedef MyEnum SomethingElse;
|
||||||
|
|
||||||
|
/* { dg-final { cleanup-ada-spec } } */
|
||||||
Loading…
Reference in New Issue