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]

Re: Expression with 2 operations


>>>>> "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


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