Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.lang.c Subject: automatic initialization to 0 Message-ID: <3090@utzoo.UUCP> Date: Sat, 16-Jul-83 21:15:42 EDT Article-I.D.: utzoo.3090 Posted: Sat Jul 16 21:15:42 1983 Date-Received: Sat, 16-Jul-83 21:15:42 EDT Organization: U of Toronto Zoology Lines: 17 If you're writing C code for an operating system-less microprocessor (i.e. .text and .data in ROM, .bss in RAM), your .bss stuff generally won't get initialized to 0. And, of course, you'll only want to put constants into .data because it's hard to change ROM. If it doesn't initialize .bss to 0, it does not comply with the C reference manual and therefore is not C. Such a botch will also break many programs (probably not relevant for this case) and many library functions (rather more serious). Putting all initialized variables in ROM is also wrong, for the same reasons. I appreciate the problems involved in figuring out which things go in ROM and which in RAM, but this is the wrong way to tackle it. -- Henry Spencer U of Toronto {allegra,ihnp4,linus,decvax}!utzoo!henry