This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Listing file-scope variables inside a pass
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Karthikeyan M'" <karthikeyan dot m at gmail dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 20 Mar 2007 11:36:00 -0000
- Subject: RE: Listing file-scope variables inside a pass
- References: <7a00ee030703191515i71c8f34bj209d1d40db4647e9@mail.gmail.com>
On 19 March 2007 22:16, Karthikeyan M wrote:
> What should I do if I want a list of all file-scope variables inside
> my own pass ?
>
> The file_scope variable is local to c-decl.c . Is there a reason why
> the scope holding variables are local to c-decl.c ?
Because we want to keep front-, mid- and back- ends of the compiler as
modular and non-interdependent as possible, perhaps?
If you need a routine to dump that data, why not write it in c-decl.c and
just expose the prototype in a suitable header file (c-tree.h)?
cheers,
DaveK
--
Can't think of a witty .sigline today....