This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Expression with 2 operations
- From: Tom Tromey <tromey at redhat dot com>
- To: Antoine Eiche <antoine dot eiche at ulp dot u-strasbg dot fr>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 04 May 2007 09:23:59 -0600
- Subject: Re: Expression with 2 operations
- References: <463A5A61.6000607@ulp.u-strasbg.fr>
- Reply-to: tromey at redhat dot com
>>>>> "Antoine" == Antoine Eiche <antoine.eiche@ulp.u-strasbg.fr> writes:
Without more information I don't know how to answer your question.
But I do have a question for you...
Antoine> I must calculate the address of an element's array.
Antoine> If the size of an element is one integer it's good.
Antoine> I do like that:
Antoine> new_rhs=fold_build2(PLUS_EXPR,TREE_TYPE(TREE_OPERAND(rhs,1)),
Antoine> build1(ADDR_EXPR, build_pointer_type (TREE_TYPE
Antoine> (array)),array),
Antoine> index);
Why not use ARRAY_REF here? Then you don't have to worry about the
size of an element of the array.
Tom