+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
}
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);
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
+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.
--- /dev/null
+/* { dg-do compile } */\r
+/* { dg-options "-fdump-ada-spec" } */\r
+\r
+enum E1 {\r
+ A1 = -1L,\r
+ A2 = 0,\r
+ A3 = 1\r
+};\r
+\r
+static enum {B1 = -1L, B2, B3} Obj1;\r
+\r
+static struct { int i; } Obj2;\r
+\r
+/* { dg-final { scan-ada-spec-not "unsigned" } } */\r
+/* { dg-final { cleanup-ada-spec } } */\r