Commit 0953878d by Joseph Myers Committed by Joseph Myers

c-typeck.c (constructor_no_implicit): Remove.

	* c-typeck.c (constructor_no_implicit): Remove.
	(set_designator, process_init_element): Don't check
	constructor_no_implicit.

From-SVN: r92951
parent cf99f196
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>
......
/* 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
......
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