decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING if type is not error_mark_node.
authorJakub Jelinek <jakub@redhat.com>
Fri, 18 Feb 2005 23:20:00 +0000 (00:20 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 18 Feb 2005 23:20:00 +0000 (00:20 +0100)
* decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
if type is not error_mark_node.

From-SVN: r95241

gcc/cp/ChangeLog
gcc/cp/decl.c

index ab452e996db45ea6bb93600aedce5a9b86a7bf3b..7dbd13b8763e411c3063549ccbf01e9ec5572aa2 100644 (file)
@@ -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
index 4f1aa1ffb94c8d9974df8c17e16d4b0a1a64dcb1..2f6b98f42554c526b759715675e585bde6182d57 100644 (file)
@@ -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;
 }