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]

Update documentation for record types


Wed Dec  5 16:03:04 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* doc/c-tree.texi (RECORD_TYPE, UNION_TYPE): Expand on definition.
	(QUAL_UNION_TYPE): New type.

*** c-tree.texi	2001/12/04 22:55:38	1.24
--- c-tree.texi	2001/12/05 22:56:50
*************** in the array.
*** 524,535 ****
  @item RECORD_TYPE
  Used to represent @code{struct} and @code{class} types, as well as
! pointers to member functions.  If @code{TYPE_PTRMEMFUNC_P} holds, then
! this type is a pointer-to-member type.  In that case, the
! @code{TYPE_PTRMEMFUNC_FN_TYPE} is a @code{POINTER_TYPE} pointing to a
! @code{METHOD_TYPE}.  The @code{METHOD_TYPE} is the type of a function
! pointed to by the pointer-to-member function.  If
! @code{TYPE_PTRMEMFUNC_P} does not hold, this type is a class type.  For
! more information, see @pxref{Classes}.
  
  @item UNKNOWN_TYPE
  This node is used to represent a type the knowledge of which is
--- 524,554 ----
  @item RECORD_TYPE
  Used to represent @code{struct} and @code{class} types, as well as
! pointers to member functions and similar constructs in other languages.
! @code{TYPE_FIELDS} contains the items contained in this type, each of
! which can be a @code{FIELD_DECL}, @code{VAR_DECL}, @code{CONST_DECL}, or
! @code{TYPE_DECL}.  You may not make any assumptions about the ordering
! of the fields in the type or whether one or more of them overlap.  If
! @code{TYPE_PTRMEMFUNC_P} holds, then this type is a pointer-to-member
! type.  In that case, the @code{TYPE_PTRMEMFUNC_FN_TYPE} is a
! @code{POINTER_TYPE} pointing to a @code{METHOD_TYPE}.  The
! @code{METHOD_TYPE} is the type of a function pointed to by the
! pointer-to-member function.  If @code{TYPE_PTRMEMFUNC_P} does not hold,
! this type is a class type.  For more information, see @pxref{Classes}.
  
+ @item UNION_TYPE
+ Used to represent @code{union} types.  Similar to @code{RECORD_TYPE}
+ except that all @code{FIELD_DECL} nodes in @code{TYPE_FIELD} start at
+ bit position zero.
+ 
+ @item QUAL_UNION_TYPE
+ Used to represent part of a variant record in Ada.  Similar to
+ @code{UNION_TYPE} except that each @code{FIELD_DECL} has a
+ @code{DECL_QUALIFIER} field, which contains a boolean expression that
+ indicates whether the field is present in the object.  The type will only
+ have one field, so each field's @code{DECL_QUALIFIER} is only evaluated
+ if none of the expressions in the previous fields in @code{TYPE_FIELDS}
+ are nonzero.  Normally these expressions will reference a field in the
+ outer object using a @code{PLACEHOLDER_EXPR}.
+ 
  @item UNKNOWN_TYPE
  This node is used to represent a type the knowledge of which is
*************** Used to represent the @code{__typeof__} 
*** 557,563 ****
  @code{TYPE_FIELDS} is the expression the type of which is being
  represented.
- 
- @item UNION_TYPE
- Used to represent @code{union} types.  For more information, @pxref{Classes}.
  @end table
  
--- 576,579 ----


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