From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24477 invoked by alias); 9 Dec 2002 03:13:27 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 24469 invoked from network); 9 Dec 2002 03:13:22 -0000 Received: from unknown (HELO sina.com) (202.108.35.249) by sources.redhat.com with SMTP; 9 Dec 2002 03:13:22 -0000 Received: (qmail 7734 invoked by uid 99); 9 Dec 2002 03:08:04 -0000 Message-ID: <20021209030804.7733.qmail@sina.com> From: luda_f To: gcc@gcc.gnu.org Subject: Usage of macro of gcc ? MIME-Version: 1.0 Date: Sun, 08 Dec 2002 19:14:00 -0000 X-Priority: 3 X-SW-Source: 2002-12/txt/msg00446.txt.bz2 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)