Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: const, volatile, etc Message-ID: <1988Dec13.172743.16505@utzoo.uucp> Organization: U of Toronto Zoology References: <674@quintus.UUCP> <117@halcdc.UUCP> <468@auspex.UUCP> <1526@micomvax.UUCP> <10988@ulysses.homer.nj.att.com> Date: Tue, 13 Dec 88 17:27:43 GMT In article <10988@ulysses.homer.nj.att.com> cjc@ulysses.homer.nj.att.com (Chris Calabrese[mav]) writes: > ... >C (B actually)was first created to write a file system handler >on PDP's. Given this fact, how could the variables _possibly_ >been non-volatile? Indeed, 99.9% of UNIX is written in C, >including _all_ the memory mapped I/O, and signal handling >routines which may be in the kernel. If the variables >can all be optimized out of loops, etc, how come the machine >I'm working on, which has a memory bit-mapped screen, >memory mapped keyboard, etc - whith all the drivers written >in Classic C - possibly work? A combination of unambitious compilers, kludges in the compilers to try to avoid problem areas, and judicious non-use of the -O flag when compiling the kernel. Don't confuse AT&T compilers with the definition of C. -- SunOSish, adj: requiring | Henry Spencer at U of Toronto Zoology 32-bit bug numbers. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu