[RFH] Uses of output.h in the front ends
Eric Botcazou
ebotcazou@adacore.com
Mon Jun 4 17:23:00 GMT 2012
> The code for the case in Ada is this:
>
> /* Ada doesn't feature Fortran-like COMMON variables so we shouldn't
> try to fiddle with DECL_COMMON. However, on platforms that don't
> support global BSS sections, uninitialized global variables would
> go in DATA instead, thus increasing the size of the executable. */
> if (!flag_no_common
> && TREE_CODE (var_decl) == VAR_DECL
> && TREE_PUBLIC (var_decl)
> && !have_global_bss_p ())
> DECL_COMMON (var_decl) = 1;
>
> That does look like premature optimization to me, but I don't really
> understand the comment, or the effect of this code. Eric, could you
> please have a look at this and help me out?
Sure, but I don't understand what you don't understand... the comment seems
clear enough to me: DECL_COMMON is needed on some platforms if you don't want
uninitialized variables to go in DATA.
--
Eric Botcazou
More information about the Gcc
mailing list