const, volatile, etc

Henry Spencer henry at utzoo.uucp
Wed Dec 14 03:27:43 AEST 1988


In article <10988 at ulysses.homer.nj.att.com> cjc at 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 at zoo.toronto.edu



More information about the Comp.lang.c mailing list