* Usage of macro of gcc ?
@ 2002-12-08 19:14 luda_f
0 siblings, 0 replies; only message in thread
From: luda_f @ 2002-12-08 19:14 UTC (permalink / raw)
To: gcc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-12-09 3:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-08 19:14 Usage of macro of gcc ? luda_f
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).