C/C++ Option to Initialize Variables?

Andrew Haley aph@redhat.com
Mon Feb 18 15:34:00 GMT 2013


On 02/18/2013 03:07 PM, Jeffrey Walton wrote:
> On Mon, Feb 18, 2013 at 9:43 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 18 February 2013 13:28, Jeffrey Walton wrote:

>>> What if the ".BSS" section was
>>> initialized to 0xFF rather than a page full of NULLs?
>>
>> That could break millions of perfectly valid programs, for no obvious benefit.
> Its hypothetical, and could be a bit humorous. Why are developers
> writing programs that rely upon undocumented features?

BSS being zero is certainly not an undocumented feature.

Andrew.



More information about the Gcc mailing list