This is the mail archive of the
mailing list for the GCC project.
Re: how to get the field_id for member of structure in gcc front end
I need the field_info to help in alias analysis. for example:
int *p = &pair.a;
int *q = &pair.b;
then if I can set length of "*p" to 4,ofset is '0' . for "*q" to
"8,4". also I know that p definitly points to pair.a and q points to
pair.b, then i can say "*p" and "*q" are not aliased with each other.
On 3/29/06, Tianwei Sheng <firstname.lastname@example.org> wrote:
> Hi all:
> for the following statement, how can I get the field_id info for
> the structure member
> 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?
Inst. of High Performance Computing
Dept. of Computer Sci. & Tech.