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

2006-03-28 Thread Tianwei Sheng
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".

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

2006-03-28 Thread Tianwei Sheng
can say "*p" and "*q" are not aliased with each other. thanks. tianwei On 3/29/06, Tianwei Sheng <[EMAIL PROTECTED]> wrote: > Hi all: >for the following statement, how can I get the field_id info for > the structure member > struct{ > int a; >

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

2006-03-29 Thread Tianwei Sheng
because of p = p +1; now p points to pair.b. any way, I will think over your "base,ofst" rule. tianwei On 3/29/06, Mike Stump <[EMAIL PROTECTED]> wrote: > On Mar 28, 2006, at 11:03 PM, Tianwei Sheng wrote: > > I need the field_info to help in alias analysis. for example: &