Bit Addressable Architectures

der Mouse mouse at mcgill-vision.UUCP
Sun Apr 10 10:26:34 AEST 1988


In article <7578 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
> In article <504 at sol.warwick.ac.uk> cudcv at cu.warwick.ac.uk (Rob McMahon) writes:
>> I wonder how much code out there assumes that ...
>> sizeof("constant string"), or sizeof(initialised_char_array)
>> is the same as strlen(xx)+1 ?
> There's a lot of code like that, no question.  It would continue to
> work if sizeof(char) were allowed to be other than 1,

How could it?

char foo[] = "This is foo";

strlen(foo) is 11.  sizeof(foo) is 12*sizeof(char).  Or are you
redefining strlen() as well?

Personally, I tend towards the sizeof returning size in bits rather
than bytes.  And making bits full objects.  And lots of other
things...but this belongs in comp.lang.d.

					der Mouse

			uucp: mouse at mcgill-vision.uucp
			arpa: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.lang.c mailing list