c-typeck.c (constructor_no_implicit): Remove.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 5 Jan 2005 15:22:38 +0000 (15:22 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 5 Jan 2005 15:22:38 +0000 (15:22 +0000)
* c-typeck.c (constructor_no_implicit): Remove.
(set_designator, process_init_element): Don't check
constructor_no_implicit.

From-SVN: r92951

gcc/ChangeLog
gcc/c-typeck.c

index fb4d6f99216df54176e7ec4c85602f0cc550a1e4..428d578ace930963e7e187405763af321f227ec1 100644 (file)
@@ -1,3 +1,9 @@
+2005-01-05  Joseph S. Myers  <joseph@codesourcery.com>
+
+       * c-typeck.c (constructor_no_implicit): Remove.
+       (set_designator, process_init_element): Don't check
+       constructor_no_implicit.
+
 2005-01-05  J"orn Rennecke <joern.rennecke@st.com>
            Kaz Kojima  <kkojima@gcc.gnu.org>
 
index 5eae3aa7d5ec5edca018333d3b94488ff8623c9d..e173c6a2d2388b34cc6cfb21db86b26d934f5226 100644 (file)
@@ -1,6 +1,6 @@
 /* Build expressions with type checking for C compiler.
-   Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -4353,9 +4353,6 @@ static struct init_node *constructor_pending_elts;
 /* The SPELLING_DEPTH of this constructor.  */
 static int constructor_depth;
 
-/* 0 if implicitly pushing constructor levels is allowed.  */
-int constructor_no_implicit = 0; /* 0 for C; 1 for some other languages.  */
-
 /* DECL node for which an initializer is being read.
    0 means we are reading a constructor expression
    such as (struct foo) {...}.  */
@@ -5026,12 +5023,6 @@ set_designator (int array)
       return 0;
     }
 
-  if (constructor_no_implicit)
-    {
-      error_init ("initialization designators may not nest");
-      return 1;
-    }
-
   switch (TREE_CODE (constructor_type))
     {
     case  RECORD_TYPE:
@@ -6002,7 +5993,7 @@ process_init_element (struct c_expr value)
            value.value = orig_value;
          /* Otherwise, if we have come to a subaggregate,
             and we don't have an element of its type, push into it.  */
-         else if (value.value != 0 && !constructor_no_implicit
+         else if (value.value != 0
                   && value.value != error_mark_node
                   && TYPE_MAIN_VARIANT (TREE_TYPE (value.value)) != fieldtype
                   && (fieldcode == RECORD_TYPE || fieldcode == ARRAY_TYPE
@@ -6090,7 +6081,7 @@ process_init_element (struct c_expr value)
            value.value = orig_value;
          /* Otherwise, if we have come to a subaggregate,
             and we don't have an element of its type, push into it.  */
-         else if (value.value != 0 && !constructor_no_implicit
+         else if (value.value != 0
                   && value.value != error_mark_node
                   && TYPE_MAIN_VARIANT (TREE_TYPE (value.value)) != fieldtype
                   && (fieldcode == RECORD_TYPE || fieldcode == ARRAY_TYPE
@@ -6130,7 +6121,7 @@ process_init_element (struct c_expr value)
            value.value = orig_value;
          /* Otherwise, if we have come to a subaggregate,
             and we don't have an element of its type, push into it.  */
-         else if (value.value != 0 && !constructor_no_implicit
+         else if (value.value != 0
                   && value.value != error_mark_node
                   && TYPE_MAIN_VARIANT (TREE_TYPE (value.value)) != elttype
                   && (eltcode == RECORD_TYPE || eltcode == ARRAY_TYPE