This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TREE_CODE: arrays and variables
- From: "Andrea Callia D'Iddio" <andrea dot calliadiddio at gmail dot com>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 17 Apr 2007 14:30:45 +0200
- Subject: TREE_CODE: arrays and variables
Hi all,
I added a new gcc pass, in wich I've to elaborate GIMPLE code... for
every GIMPLE statement I use TREE_CODE macro to know if is an
assignment, an IF-THEN-ELSE, etc. and for every GIMPLE expression I
use also TREE_CODE macro to know if it's an integer constant, an
addition, etc.
I know that if expression 'e' is a variable or an array element, then
TREE_CODE(e)==VAR_DECL. But how can I know if 'e' is a variable, or an
array element? and, if it's an array element, how can I know which is
the index value? can I have other informations such as array's size
and array's name?
Thanks to all
Andrea