c-ada-spec.c (dump_generic_ada_node): Take into account signedness for enumeral types.
* c-ada-spec.c (dump_generic_ada_node): Take into account signedness for enumeral types. (print_ada_declaration): Add missing guard for record types. From-SVN: r250714
This commit is contained in:
parent
e071b76781
commit
942047f22f
@ -1,3 +1,9 @@
|
||||
2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* c-ada-spec.c (dump_generic_ada_node): Take into account signedness
|
||||
for enumeral types.
|
||||
(print_ada_declaration): Add missing guard for record types.
|
||||
|
||||
2017-07-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/45784
|
||||
|
@ -2055,7 +2055,10 @@ dump_generic_ada_node (pretty_printer *buffer, tree node, tree type, int spc,
|
||||
}
|
||||
else
|
||||
{
|
||||
pp_string (buffer, "unsigned");
|
||||
if (TYPE_UNSIGNED (node))
|
||||
pp_string (buffer, "unsigned");
|
||||
else
|
||||
pp_string (buffer, "int");
|
||||
for (; value; value = TREE_CHAIN (value))
|
||||
{
|
||||
pp_semicolon (buffer);
|
||||
@ -3097,7 +3100,7 @@ print_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc)
|
||||
if (TYPE_NAME (TREE_TYPE (t)))
|
||||
dump_generic_ada_node
|
||||
(buffer, TREE_TYPE (t), t, spc, false, true);
|
||||
else
|
||||
else if (type)
|
||||
dump_ada_double_name (buffer, type, t);
|
||||
}
|
||||
else
|
||||
|
@ -1,3 +1,7 @@
|
||||
2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* c-c++-common/dump-ada-spec-7.c: New test.
|
||||
|
||||
2017-07-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* g++.dg/debug/dwarf2/inline-ns-1.C: New test.
|
||||
|
15
gcc/testsuite/c-c++-common/dump-ada-spec-7.c
Normal file
15
gcc/testsuite/c-c++-common/dump-ada-spec-7.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fdump-ada-spec" } */
|
||||
|
||||
enum E1 {
|
||||
A1 = -1L,
|
||||
A2 = 0,
|
||||
A3 = 1
|
||||
};
|
||||
|
||||
static enum {B1 = -1L, B2, B3} Obj1;
|
||||
|
||||
static struct { int i; } Obj2;
|
||||
|
||||
/* { dg-final { scan-ada-spec-not "unsigned" } } */
|
||||
/* { dg-final { cleanup-ada-spec } } */
|
Loading…
Reference in New Issue
Block a user