[Bug middle-end/51255] Using -fwhole-program breaks code which puts values in .ctors or .init_array

hubicka at ucw dot cz gcc-bugzilla@gcc.gnu.org
Mon Apr 16 13:51:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51255

--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> 2012-04-16 13:50:35 UTC ---
How common is this construction in practice?  Adding a warning or making GCC to
imply used attribute is same amount of work - it means teaching GCC about those
and possibly others special purpose sections.  Or alternatively declare all
named sections special purpose and implicitely used.

The code is not conforming any standards.  In past we started taking away
unused
variables/functions that also broke asm constructs and required annotations
without
making an attempt for GCC to parse asm statements.

Section names are easier to parse, indeed, but still the situation is very
symmetric
here.

Honza



More information about the Gcc-bugs mailing list