This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
GENERIC build pointer plus expression
- From: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 12 Feb 2014 21:36:43 +0530
- Subject: GENERIC build pointer plus expression
- Authentication-results: sourceware.org; auth=none
I want to build tree for the following c expression:
p + foo(); (p is pointer type and foo() returns size_t)
Is following the correct way to do it:
(call_expr represents call to foo() )
tree expr = build2 (POINTER_PLUS_EXPR, TREE_TYPE (p), p, call_expr);
Thanks and Regards,
Prathamesh