public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* order of declared filed in a struct
@ 2006-06-15 20:40 Wang,Yi
  2006-06-16  6:44 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Wang,Yi @ 2006-06-15 20:40 UTC (permalink / raw)
  To: gcc-help

Hi all:

 In the GIMPLE tree, How do I get the order of the field declared in a
struct (RECORD_TYPE) ? The GCC Internal explains that I could not make
any assumptions abut the ordering of th field.


-------------------------------
RECORD_TYPE
    Used to represent struct and class types, as well as pointers to
member functions and similar constructs in other languages.
TYPE_FIELDS contains the items contained in this type, each of which
can be a FIELD_DECL, VAR_DECL, CONST_DECL, or 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 TYPE_PTRMEMFUNC_P holds, then
this type is a pointer-to-member type. In that case, the
TYPE_PTRMEMFUNC_FN_TYPE is a POINTER_TYPE pointing to a METHOD_TYPE.
The METHOD_TYPE is the type of a function pointed to by the
pointer-to-member function. If TYPE_PTRMEMFUNC_P does not hold, this
type is a class type. For more information, see see Classes.
-----------------------------


Thanks

-- 
Yi Wang
Software Engineering, ComSci@U of T

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-16  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15 20:40 order of declared filed in a struct Wang,Yi
2006-06-16  6:44 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).