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: [RFH] Uses of output.h in the front ends


> What I don't understand, is whether this is still something GNAT has
> to support, or whether this code can be deprecated/removed.

Yes, we still need it on platforms for which have_global_bss_p is false.
In Ada, it's very easy to declare huge objects and we don't want them to take 
space in the executable if they are uninitialized (in Ada, uninitialized 
objects at the global level are not zeroed, unlike in C/C++).

> For the corresponding option for G++ (-fconserve-space) the
> documentation says that the flag isn't very useful anymore because:
> "This option is no longer useful on most targets, now that support has
> been added for putting variables into BSS without making them common."

This looks equivalent to saying "most targets have_global_bss_p" to me.
So the problem boils down to finding the remaining targets (if any) and 
determining if they still matter nowadays.

> I was hoping maybe you know how to rewrite that piece of code such that you
> get that uninitialized variable into BSS without DECL_COMMON.

This is probably low-level trickery on exotic platforms so I'm not sure I want 
to start this kind of endeavor.

-- 
Eric Botcazou


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