From 8c8b7be5da3fd7a26bdeca99cf307af504543cf3 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Fri, 9 Feb 2018 08:54:54 +0000 Subject: [PATCH] c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant' keyword for components. * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant' keyword for components. From-SVN: r257517 --- gcc/c-family/ChangeLog | 5 +++++ gcc/c-family/c-ada-spec.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 02b2b1ab9ee..881df2c3e22 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2018-02-09 Eric Botcazou + + * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant' + keyword for components. + 2018-02-02 Paolo Carlini * c-common.h (DECL_UNNAMED_BIT_FIELD): New. diff --git a/gcc/c-family/c-ada-spec.c b/gcc/c-family/c-ada-spec.c index 914ded9efc9..1c1cadc54f5 100644 --- a/gcc/c-family/c-ada-spec.c +++ b/gcc/c-family/c-ada-spec.c @@ -3131,7 +3131,7 @@ dump_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc) { pp_string (buffer, "aliased "); - if (TREE_READONLY (t)) + if (TREE_READONLY (t) && TREE_CODE (t) != FIELD_DECL) pp_string (buffer, "constant "); if (TYPE_NAME (TREE_TYPE (t))) @@ -3147,7 +3147,7 @@ dump_ada_declaration (pretty_printer *buffer, tree t, tree type, int spc) || TREE_CODE (TREE_TYPE (t)) != INTEGER_TYPE)) pp_string (buffer, "aliased "); - if (TREE_READONLY (t)) + if (TREE_READONLY (t) && TREE_CODE (t) != FIELD_DECL) pp_string (buffer, "constant "); dump_generic_ada_node -- 2.30.2