aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Wilson <wilson@specifixinc.com>2003-12-02 01:32:39 +0000
committerJim Wilson <wilson@gcc.gnu.org>2003-12-01 17:32:39 -0800
commit98376d4a7e314f36ec28ad7fae40d0e23cd77a7f (patch)
treea1f876212a34996d2b05feaf675dc15b1e736c4a
parent4582b84915e6c7c3eed9daf55d8bc1839249203f (diff)
downloadgcc-98376d4a7e314f36ec28ad7fae40d0e23cd77a7f.zip
gcc-98376d4a7e314f36ec28ad7fae40d0e23cd77a7f.tar.gz
gcc-98376d4a7e314f36ec28ad7fae40d0e23cd77a7f.tar.bz2
Fixes issues pointed out by Chris Lattner.
* doc/c-tree.texi (CONSTRUCTOR): Clarify element order and handling of missing fields. From-SVN: r74143
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/doc/c-tree.texi11
2 files changed, 8 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9fec01b..47096ff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2003-12-01 James E Wilson <wilson@specifixinc.com>
+ * doc/c-tree.texi (CONSTRUCTOR): Clarify element order and handling
+ of missing fields.
+
PR target/8407
* config/ia64/ia64.c (ia64_function_arg): For single-reg HFA, call
gen_rtx_REG to create new reg with argument mode.
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi
index 112aa11..31be162 100644
--- a/gcc/doc/c-tree.texi
+++ b/gcc/doc/c-tree.texi
@@ -2234,10 +2234,7 @@ second operand is a @code{TREE_LIST}. If the @code{TREE_TYPE} of the
@code{CONSTRUCTOR} is a @code{RECORD_TYPE} or @code{UNION_TYPE}, then
the @code{TREE_PURPOSE} of each node in the @code{TREE_LIST} will be a
@code{FIELD_DECL} and the @code{TREE_VALUE} of each node will be the
-expression used to initialize that field. You should not depend on the
-fields appearing in any particular order, nor should you assume that all
-fields will be represented. Unrepresented fields may be assigned any
-value.
+expression used to initialize that field.
If the @code{TREE_TYPE} of the @code{CONSTRUCTOR} is an
@code{ARRAY_TYPE}, then the @code{TREE_PURPOSE} of each element in the
@@ -2247,8 +2244,10 @@ again, the @code{TREE_VALUE} is the corresponding initializer. If the
@code{TREE_PURPOSE} is @code{NULL_TREE}, then the initializer is for the
next available array element.
-Conceptually, before any initialization is done, the entire area of
-storage is initialized to zero.
+In the front end, you should not depend on the fields appearing in any
+particular order. However, in the middle end, fields must appear in
+declaration order. You should not assume that all fields will be
+represented. Unrepresented fields will be set to zero.
@item COMPOUND_LITERAL_EXPR
@findex COMPOUND_LITERAL_EXPR_DECL_STMT