This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Usage of macro of gcc ?
- From: luda_f <luda_f at sina dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 09 Dec 2002 11:08:04 +0800
- Subject: Usage of macro of gcc ?
Dear friends,
I have a question in using GCC macros. May I have your help? Thanks a lot for your attention.
For a expression of INDIRECT_REF or ADDR_EXPR, how can I get the variables from them?
For example, for stament
*p=&i;
I have the code:
expr = EXPR_STMT_EXPR(stmt);
leftexpr = TREE_OPERAND(expr,0);
rightexpr = TREE_OPERAND(expr,1);
So we can get from it that:
TREE_CODE(leftexpr)==INDIRECT_REF
TREE_CODE(rightexpr)==ADDR_EXPR
and how can I get variable p and i then? Is there some macros like EXPR_STMT_EXPR that can achieve this purpose?
Thanks for your time!
Wang Nan
Software Engineering Institute
Xidian University, P. R. China
______________________________________
===================================================================
免费试用新浪15M收费邮箱 赶紧行动! (http://vip.sina.com/sol_mail/promotion/pro_men.html)
新浪二手市场:一元投入,十分惊喜,百分满意 (http://classad.sina.com.cn/2shou/)
数万张手机图片数万首短信铃声任你挑选,每天都有更新 (http://sms.sina.com.cn/cgi-bin/sms/smspic.cgi)