Whitesmith and static variable init.

rck at ihuxm.UUCP rck at ihuxm.UUCP
Sat Jul 16 02:30:27 AEST 1983

I've had some experience with Whitesmith's C compiler and support tools.
Unfortunately, their variable initialization does not follow the accepted
standard, but they don't have much of a choice.  The Whitesmith package
is designed for use on small "operating systems" like CP/M.  CP/M does
not support any kind of runtime loader that zeroes a program's bss
section, so apparently Whitesmith's has taken the approach of forcing
all statics to be initialized in order to force them into the data
section of the program.  So in this way, the initialized variables, be
they scalar or array, are part of the program image and are copied in
when the program is run.  I don't know why Whitesmith's just didn't put
ALL statics into the data section, even if they weren't explicitly
initialized.  Maybe someone else could respond.
						Ron Kukuk
						Bell Labs

More information about the Comp.lang.c mailing list