Xref: utzoo comp.lang.c:9093 comp.arch:4306 Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.lang.c,comp.arch Subject: Re: Bit Addressable Architectures Message-ID: <1040@mcgill-vision.UUCP> Date: 10 Apr 88 00:26:34 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <2245@geac.UUCP> <7578@brl-smoke.ARPA> Organization: McGill University, Montreal Lines: 22 In article <7578@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <504@sol.warwick.ac.uk> cudcv@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@mcgill-vision.uucp arpa: mouse@larry.mcrcim.mcgill.edu