* Access the BIND_EXPR of a function
@ 2008-07-31 9:36 Thomas A.M. Bernard
0 siblings, 0 replies; 2+ messages in thread
From: Thomas A.M. Bernard @ 2008-07-31 9:36 UTC (permalink / raw)
To: gcc
Hi,
When I encounter a FUNCTION_DECL, I want to access the node BIND_EXPR
where I can find the artificial declarations of the current functions
that the compiler adds. Following what the documentation says, I use the
macro DECL_SAVED_TREE which should point to the node BIND_EXPR (used as
follows, DECL_SAVED_TREE (current_function_decl)). Unfortunately, this
returns the STATEMENT_LIST node instead. In theory in the GIMPLE, if
there are artificial declarations, FUNCTION_DECL has a child called body
which points to BIND_EXPR and then BIND_EXPR has a child body which
points to STATEMENT_LIST.
Btw, I use GCC 4.1. Any ideas for accessing the BIND_EXPR node?
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
* Access the BIND_EXPR of a function
@ 2008-06-30 17:01 Thomas A.M. Bernard
0 siblings, 0 replies; 2+ messages in thread
From: Thomas A.M. Bernard @ 2008-06-30 17:01 UTC (permalink / raw)
To: gcc
Hi,
When I encounter a FUNCTION_DECL, I want to access the node BIND_EXPR
where I can find the artificial declarations of the current functions
that the compiler adds. Following what the documentation says, I use the
macro DECL_SAVED_TREE which should point to the node BIND_EXPR (used as
follows, DECL_SAVED_TREE (current_function_decl)). Unfortunately, this
returns the STATEMENT_LIST node instead. In theory in the GIMPLE, if
there are artificial declarations, FUNCTION_DECL has a child called body
which points to BIND_EXPR and then BIND_EXPR has a child body which
points to STATEMENT_LIST.
Btw, I use GCC 4.1. Any ideas for accessing the BIND_EXPR node?
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-31 9:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 9:36 Access the BIND_EXPR of a function Thomas A.M. Bernard
-- strict thread matches above, loose matches on Subject: below --
2008-06-30 17:01 Thomas A.M. Bernard
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).