diff options
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)) |