This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Declare a variable which can be incremented by all of the functions


> -----Original Message-----
> From: gcc-owner On Behalf Of Qiong Cai
> Sent: 17 July 2004 14:19

> I'd like to declare a variable which can be incremented by all of the
> functions in a program.
> 
> The variable is declared in "basic-block.h", initialized in
> "toplev.c", and incremented in several RTL passes. However, this only
> works for the functions in one .c file.
> The variable is always intitailzied to zero when a new .c 
> file is compiled.
> 
> Is there any solution for this problem?  


  Wouldn't it work to just declare it statically initialised to zero and
then don't reset it in toplev.c?


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]