diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-02-09 08:54:54 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2018-02-09 08:54:54 +0000 |
commit | 8c8b7be5da3fd7a26bdeca99cf307af504543cf3 (patch) | |
tree | 177b3a0a9fb9824023f2a77aaf6e78c3ebb73bb2 /gcc/c-family | |
parent | 91eb884d75e9007e73855e44a7df83b3721d0825 (diff) | |
download | gcc-8c8b7be5da3fd7a26bdeca99cf307af504543cf3.zip gcc-8c8b7be5da3fd7a26bdeca99cf307af504543cf3.tar.gz gcc-8c8b7be5da3fd7a26bdeca99cf307af504543cf3.tar.bz2 |
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
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 5 | ||||
-rw-r--r-- | 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 02b2b1a..881df2c 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,8 @@ +2018-02-09 Eric Botcazou <ebotcazou@adacore.com> + + * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant' + keyword for components. + 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com> * 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 914ded9..1c1cadc5 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 |