Commit e96eb215 by Jakub Jelinek Committed by Jakub Jelinek

* c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE.

From-SVN: r55646
parent cf3c4f56
2002-07-22 Jakub Jelinek <jakub@redhat.com> 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 * c-decl.c (build_compound_literal): Defer compound literal decls
until until file end to emit them only if they are actually used. until until file end to emit them only if they are actually used.
......
...@@ -3647,6 +3647,7 @@ build_compound_literal (type, init) ...@@ -3647,6 +3647,7 @@ build_compound_literal (type, init)
DECL_CONTEXT (decl) = current_function_decl; DECL_CONTEXT (decl) = current_function_decl;
TREE_USED (decl) = 1; TREE_USED (decl) = 1;
TREE_TYPE (decl) = type; TREE_TYPE (decl) = type;
TREE_READONLY (decl) = TREE_READONLY (type);
store_init_value (decl, init); store_init_value (decl, init);
if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type)) if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment