This is the mail archive of the gcc-patches@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: [Ada] Delete bogus use of flag_zero_initialized_in_bss


Hi Eric,

The Ada front-end seems to think that clearing flag_zero_initialized_in_bss
means that global variables without an explicit initializer will be
considered to be uninitialized rather than zero initialized by the rest of
the compiler.

No, it doesn't, you misunderstood.


Rather than specifying whether the global will be zero initialized or not,
it specifies by what method it will be zero initialized: whether by placing
in the BSS section or by outputting an explicit block of zeros.

Yes, that's precisely why the flag needs to be cleared: uninitialized really means uninitialized in Ada so the BSS section isn't guaranteed to be zero-ed at startup for a pure Ada program.

on most systems (such as linux) it is the O/S that takes care of ensuring the BSS section is filled with zeros, so I don't see how being an Ada program is relevant.

Ciao,

Duncan.


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