aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-07-29 09:52:04 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-07-29 09:52:04 +0000
commit942047f22f64013b9f481a6390a25c345b265d66 (patch)
treeb990e90ce911119dbcb4f4c59c39f88629ced153 /gcc/c-family
parente071b7678195f4176938730e348503cddc2a87b4 (diff)
downloadgcc-942047f22f64013b9f481a6390a25c345b265d66.zip
gcc-942047f22f64013b9f481a6390a25c345b265d66.tar.gz
gcc-942047f22f64013b9f481a6390a25c345b265d66.tar.bz2
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
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-ada-spec.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index c05ca12..88752a8 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -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
diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c
index d39501c..de54950 100644
--- a/gcc/c-family/c-ada-spec.c
+++ b/gcc/c-family/c-ada-spec.c
@@ -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