summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-05 15:22:38 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-05 15:22:38 +0000
commitd585e4c97e5837a066d1366654814bbfe9de53ac (patch)
tree5d187034169ae334fd9db4506ff30f71a331b03a /gcc/c-typeck.c
parentd4f6028d4e4e8024f792b1f790c2631ff2e59e6d (diff)
downloadppe42-gcc-d585e4c97e5837a066d1366654814bbfe9de53ac.tar.gz
ppe42-gcc-d585e4c97e5837a066d1366654814bbfe9de53ac.zip
* c-typeck.c (constructor_no_implicit): Remove.
(set_designator, process_init_element): Don't check constructor_no_implicit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92951 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 5eae3aa7d5e..e173c6a2d23 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -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
OpenPOWER on IntegriCloud