Bit Addressable Architectures

Chris Torek chris at mimsy.UUCP
Fri Apr 15 03:38:39 AEST 1988


In article <8646 at eleazar.Dartmouth.EDU> major at eleazar.Dartmouth.EDU
(Lou Major) writes:
>*ahem*
>char foo[]="This is a test.";
>sizeof (foo) == sizeof (char *)
>NOT the number of machine bytes/words those characters take up.

Quite wrong.

There *are* compilers that produce the wrong answer for

	sizeof("string")

(the `correct' number is 7), but any compiler that gets sizeof(foo)
above wrong (2 or 4 rather than 16) is so egregiously broken that
it is not worth discussing.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list