www.digitalmars.com         C & C++   DMDScript  

c++.command-line - switch for bss to data?

reply mjs NOSPAM.hannover.sgh-net.de (Mark Junker) writes:
Hi,

is there a compiler switch that places uninitialized data into the segment/ 
section for initialized data (init with zero) instead of BSS ?

Regards,
Mark Junker
Jun 15 2003
next sibling parent "Walter" <walter digitalmars.com> writes:
"Mark Junker" <mjs NOSPAM.hannover.sgh-net.de> wrote in message
news:8nt9nmrO8gB hannover.sgh-net.de...
 is there a compiler switch that places uninitialized data into the

 section for initialized data (init with zero) instead of BSS ?

No. But if you explicitly init it with 0, it will go into initialized data: int x; // BSS int y = 0; // initialized data
Jun 15 2003
prev sibling parent mjs NOSPAM.hannover.sgh-net.de (Mark Junker) writes:
 No. But if you explicitly init it with 0, it will go into initialized data:
 int x;    // BSS
 int y = 0; // initialized data

circumstances (tons of source code) it's difficult to be sure that every variable was changed. Regards, Mark Junker
Jun 16 2003