public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: xinant@cognigine.com (Xinan Tang)
To: binutils@sources.redhat.com
Subject: "lang_statement_union_type and its usage?"
Date: Thu, 31 May 2001 11:57:00 -0000	[thread overview]
Message-ID: <3B169422.8090300@cognigine.com> (raw)

Hi

  In ld/ldlang.h, lang_statement_union_type is defined as:

typedef union lang_statement_union
{
  lang_statement_header_type header;
  union lang_statement_union *next;
  ... /* Other stuffs */
} lang_statement_union_type;


  However, I saw in many places in `ldlang.c', the list is traversed as
follows:

   for (; s != (lang_statement_union_type *) NULL; s = s->next)
    {
      switch (s->header.type)
    ...
    }

  The question is that the 'next' and 'header' fields are exclusive, how
could they be used at the same time. Could some one inlight me why
this usage is SAFE?

  My goal is to traverse the statement list at the linking time. I have
difficulty to understand why the list is searched in this way.

Thanks



-- 
Dr. Xinan Tang                    Member of Technical Staff
EMail: xinant@cognigine.com  	  Cognigine Corp.
Voice: 510.743.4930               6120 Stevenson Boulevard
Fax:   510.743.4910               Fremont, CA  94538

             reply	other threads:[~2001-05-31 11:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-31 11:57 Xinan Tang [this message]
2001-05-31 12:11 ` Ian Lance Taylor
2001-05-31 13:47   ` Xinan Tang
2001-05-31 13:56     ` Geoff Keating
2001-05-31 14:10     ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B169422.8090300@cognigine.com \
    --to=xinant@cognigine.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).