aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ab452e9..7dbd13b 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-19 Jakub Jelinek <jakub@redhat.com>
+
+ * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
+ if type is not error_mark_node.
+
2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/19508
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 4f1aa1f..2f6b98f 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3829,7 +3829,7 @@ start_decl_1 (tree decl)
so we need to be conservative and unset TREE_READONLY for types
with constructors. Otherwise aliasing code will ignore stores in
an inline constructor. */
- if (TYPE_NEEDS_CONSTRUCTING (type))
+ if (type != error_mark_node && TYPE_NEEDS_CONSTRUCTING (type))
TREE_READONLY (decl) = 0;
}