how to get expr from INDIRECT_REF
luda_f
luda_f@sina.com
Sun Dec 8 21:03:00 GMT 2002
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)
More information about the Gcc
mailing list