Uninitialized externals and statics.

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Aug 22 05:09:59 AEST 1989


In article <1989Aug19.053711.7462 at twwells.com> bill at twwells.com (T. William Wells) writes:
>int     Array[1000] = {0};
>This sort of thing made the difference between a product that could
>be shipped on one floppy and one that required two.

The interesting thing is, the compiler is entitled to treat this exactly
the same as the non-explicit initializer case.  The difference is a side
effect of UNIX having adopted the COMMON model for extern data.  Somewhere
along the way, AT&T PCC releases started supporting DEF/REF (in effect),
without the extra cleverness that would have kept executables from turning
.BSS into .DATA.



More information about the Comp.lang.c mailing list