diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-07-22 12:15:49 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2002-07-22 12:15:49 +0200 |
commit | e96eb21529566bd9c41bc4786c2d7a4a8307fba9 (patch) | |
tree | b34535797baa645347d003ff712e613612f00022 /gcc | |
parent | cf3c4f5609b982b1e640f5ac5a51b07711ec29de (diff) | |
download | gcc-e96eb21529566bd9c41bc4786c2d7a4a8307fba9.zip gcc-e96eb21529566bd9c41bc4786c2d7a4a8307fba9.tar.gz gcc-e96eb21529566bd9c41bc4786c2d7a4a8307fba9.tar.bz2 |
* c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE.
From-SVN: r55646
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-decl.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44bf4e1..74205f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2002-07-22 Jakub Jelinek <jakub@redhat.com> + * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE. + +2002-07-22 Jakub Jelinek <jakub@redhat.com> + * c-decl.c (build_compound_literal): Defer compound literal decls until until file end to emit them only if they are actually used. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 57af611..f4f9957 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3647,6 +3647,7 @@ build_compound_literal (type, init) DECL_CONTEXT (decl) = current_function_decl; TREE_USED (decl) = 1; TREE_TYPE (decl) = type; + TREE_READONLY (decl) = TREE_READONLY (type); store_init_value (decl, init); if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type)) |