This is the mail archive of the gcc@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]

how to get the field_id for member of structure in gcc front end


Hi all:
   for the following statement, how can I get the field_id info for
the structure member
  struct{
  int a;
  int b;
} pair;
int main()
{
  int * p = &pair.a;
}

It seems that we can't get the field_id info because of address taken
operator. it treats the "&pair.a" as "&pair + ofset of a".
I am not familiar with the gcc tree. any one know this?

thanks.

tianwei


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