This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[doc patch] Update CONSTRUCTOR doc


This patch updates the CONSTRUCTOR docs to reflect reality.

ok?

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2004-12-09  Nathan Sidwell  <nathan@codesourcery.com>

	* doc/c-tree.texi (CONSTRUCTOR): Mention RANGE_EXPRs.

Index: doc/c-tree.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/c-tree.texi,v
retrieving revision 1.67
diff -c -3 -p -r1.67 c-tree.texi
*** doc/c-tree.texi	5 Nov 2004 01:36:55 -0000	1.67
--- doc/c-tree.texi	9 Dec 2004 16:10:01 -0000
*************** expression used to initialize that field
*** 2273,2283 ****
  
  If the @code{TREE_TYPE} of the @code{CONSTRUCTOR} is an
  @code{ARRAY_TYPE}, then the @code{TREE_PURPOSE} of each element in the
! @code{TREE_LIST} will be an @code{INTEGER_CST}.  This constant indicates
! which element of the array (indexed from zero) is being assigned to;
! 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.
  
  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
--- 2273,2286 ----
  
  If the @code{TREE_TYPE} of the @code{CONSTRUCTOR} is an
  @code{ARRAY_TYPE}, then the @code{TREE_PURPOSE} of each element in the
! @code{TREE_LIST} will be an @code{INTEGER_CST} or a @code{RANGE_EXPR} of
! two @code{INTEGER_CST}s.  A single @code{INTEGER_CST} indicates which
! element of the array (indexed from zero) is being assigned to.  A
! @code{RANGE_EXPR} indicates an inclusive range of elements to
! initialize.  In both cases the @code{TREE_VALUE} is the corresponding
! initializer.  It is re-evaluated for each element of a
! @code{RANGE_EXPR}.  If the @code{TREE_PURPOSE} is @code{NULL_TREE}, then
! the initializer is for the next available array element.
  
  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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]