Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: explain representation of Fortran array types
@ 2004-08-25 15:42 Jim Blandy
  0 siblings, 0 replies; only message in thread
From: Jim Blandy @ 2004-08-25 15:42 UTC (permalink / raw)
  To: gdb-patches


2004-08-25  Jim Blandy  <jimb@redhat.com>

	* gdbtypes.h (TYPE_CODE_ARRAY): Doc fix.

*** gdbtypes.h.~1.58.~	2004-08-09 17:42:14.000000000 -0500
--- gdbtypes.h	2004-08-25 00:51:03.000000000 -0500
*************** enum type_code
*** 82,88 ****
    {
      TYPE_CODE_UNDEF,		/* Not used; catches errors */
      TYPE_CODE_PTR,		/* Pointer type */
!     TYPE_CODE_ARRAY,		/* Array type with lower & upper bounds. */
      TYPE_CODE_STRUCT,		/* C struct or Pascal record */
      TYPE_CODE_UNION,		/* C union or Pascal variant part */
      TYPE_CODE_ENUM,		/* Enumeration type */
--- 82,108 ----
    {
      TYPE_CODE_UNDEF,		/* Not used; catches errors */
      TYPE_CODE_PTR,		/* Pointer type */
! 
!     /* Array type with lower & upper bounds.
! 
!        Regardless of the language, GDB represents multidimensional
!        array types the way C does: as arrays of arrays.  So an
!        instance of a GDB array type T can always be seen as a series
!        of instances of TYPE_TARGET_TYPE (T) laid out sequentially in
!        memory.
! 
!        Row-major languages like C lay out multi-dimensional arrays so
!        that incrementing the rightmost index in a subscripting
!        expression results in the smallest change in the address of the
!        element referred to.  Column-major languages like Fortran lay
!        them out so that incrementing the leftmost index results in the
!        smallest change.
! 
!        This means that, in column-major languages, working our way
!        from type to target type corresponds to working through indices
!        from right to left, not left to right.  */
!     TYPE_CODE_ARRAY,
! 
      TYPE_CODE_STRUCT,		/* C struct or Pascal record */
      TYPE_CODE_UNION,		/* C union or Pascal variant part */
      TYPE_CODE_ENUM,		/* Enumeration type */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-25 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-25 15:42 PATCH: explain representation of Fortran array types Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox