(char *) NULL

Alan S. Driscoll alan at allegra.UUCP
Wed Mar 14 04:22:06 AEST 1984


Here we go again...


	C was created with a specific machine model in mind, and
	the intention that ON MACHINES CONFORMING TO THAT MODEL
	all language constructs would be extremely efficient to
	implement at the machine level.  This makes it intrinsically
	fast, both in compilation and at run-time. The discussions
	in net.lang.c about problems in the definition of C seem
	largely to relate to machines that DON'T CONFORM TO THE
	MODEL!  In particular, C is designed for a BYTE-ADDRESSED
	machine (re: NULL parameter to function problem) with a
	few registers, and special machine-language opcodes to make
	certain operations efficient -- operating with zero, pointer
	indirection, and so forth.

					Bennett Todd
					...{decvax,ihnp4,akgua}!mcnc!ecsvax!bet


The 68000 is a byte-addressable machine.  If you pass a 16-bit
integer, such as NULL, to a function expecting a 32-bit pointer,
you're going to have problems.  This has been explained, over
and over, and over...

Maybe C has too sophisticated a model of the programmer.

-- 

	Alan S. Driscoll
	AT&T Bell Laboratories



More information about the Comp.lang.c mailing list