Commit 9e25c7ed by Eric Botcazou Committed by Eric Botcazou

c-ada-spec.c (dump_ada_double_name): New case.

	* c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
	(is_char_array): Take a type instead of a declaration.
	(dump_ada_array_type): Likewise.
	(is_simple_enum): Minor tweak.
	(dump_ada_enum_type): New function extracted from...
	(dump_ada_node) <ENUMERAL_TYPE>: ...here.  Invoke it.
	<INTEGER_TYPE>: Remove unreachable code.
	<RECORD_TYPE>: Likewise.  Minor tweaks.
	(dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
	<ENUMERAL_TYPE>: New case.
	<RECORD_TYPE>: Factor out common code.
	(dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
	Minor tweaks.  Deal with enumeral types.
	(dump_ada_structure): Minor tweaks.

From-SVN: r258067
parent 09de3550
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
(is_char_array): Take a type instead of a declaration.
(dump_ada_array_type): Likewise.
(is_simple_enum): Minor tweak.
(dump_ada_enum_type): New function extracted from...
(dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
<INTEGER_TYPE>: Remove unreachable code.
<RECORD_TYPE>: Likewise. Minor tweaks.
(dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
<ENUMERAL_TYPE>: New case.
<RECORD_TYPE>: Factor out common code.
(dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
Minor tweaks. Deal with enumeral types.
(dump_ada_structure): Minor tweaks.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
address for incomplete structures.
(dump_forward_type): Do not bail out for incomplete structures.
......
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/dump-ada-spec-12.c: New test.
* c-c++-common/dump-ada-spec-13.c: Likewise.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/dump-ada-spec-11.c: New test.
2018-02-28 Martin Liska <mliska@suse.cz>
......
/* { dg-do compile } */
/* { dg-options "-fdump-ada-spec" } */
struct S1
{
enum { Blue, Red, Green } E;
};
struct S2
{
enum { One = 1, Two, Three } E;
};
/* { dg-final { cleanup-ada-spec } } */
/* { dg-do compile } */
/* { dg-options "-fdump-ada-spec" } */
struct S1
{
enum T1 { Blue, Red, Green } E;
};
struct S2
{
enum T2 { One = 1, Two, Three } E;
};
/* { dg-final { cleanup-ada-spec } } */
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