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: Getting knowledge of common declarations at the time they are declared in the source


On Fri, May 09, 2003 at 07:29:14PM +0200, Alexandre Courbot wrote:
> Therefore ASM_OUTPUT_COMMON for randomvar will be called *after* the code for 
> foo is generated, which means after references to randomvar are outputted. 

Yes, this is required because a COMMON variable is tentative.
We won't know whether it's really common until the end of the
translation unit.

> Because of this behavior, I don't have any (known) way to build my custom 
> informations about randomvar before it is used, since I use the 
> ASM_OUTPUT_COMMON hook to build them. So my backend cannot perform correctly.

On mainline do have SYMBOL_REF_DECL, which will tell you that
the variable is still tentative, ie still DECL_COMMON.


r~


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