Bit Addressable Architectures

Rob McMahon cudcv at daisy.warwick.ac.uk
Sun Mar 27 04:58:12 AEST 1988


Newsgroups: comp.lang.c,comp.arch
Subject: Re: Bit Addressable Architectures
References: <11702 at brl-adm.ARPA> <243 at eagle_snax.UUCP> <2245 at geac.UUCP> <1988Mar6.002518.945 at utzoo.uucp> <2760 at mmintl.UUCP> <17458 at watmath.waterloo.edu>
Reply-To: cudcv at titania.warwick.ac.uk (Rob McMahon)
Distribution: 
Organization: Computing Services, Warwick University, UK

In article <17458 at watmath.waterloo.edu> ccplumb at watmath.waterloo.edu (Colin Plumb) writes:
>Backwards compatibility?  With a C compiler insulating the user, the
>only change is that sizeof(char) is now 8.

Only change ?  Sounds like a big "only" to me.  I wonder how much code
out there assumes that sizeof(char) == 1, that sizeof("constant string"), 
or sizeof(initialised_char_array) is the same as strlen(xx)+1 ?  Does
malloc now take number of bits required, or char's ?  It's going to
break either "malloc(n * sizeof(s))" or "malloc(strlen(s) + 1)", or does
everybody but me write "malloc((strlen(s)+1)*sizeof(char))" ?

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv at uk.ac.warwick.cu          ARPA:   cudcv at cu.warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England



More information about the Comp.lang.c mailing list