Date: Thu, 13 May 1999 18:29:12 +0200 From: Hans-Bernhard Broeker Message-Id: <199905131629.SAA32708@acp3bf.physik.rwth-aachen.de> To: djgpp AT delorie DOT com Subject: Re: Portability and size_t type related question Newsgroups: comp.os.msdos.djgpp Organization: RWTH Aachen, III. physikalisches Institut B X-Newsreader: TIN [version 1.2 PL2] Reply-To: djgpp AT delorie DOT com In article you wrote: > On Thu, 13 May 1999, Guillermo Rodriguez Garcia wrote: > > >> Like 'char' is always 1 byte. > > > > > >That's not true, either. There are compilers (mostly for embedded > > >systems) where `char' is 32-bit wide. > > > > Then a byte is defined as 32 bits on those systems. > AFAIK, there's no such thing as a `byte' in the C language description. At least in the C9x draft standard, there is. Quote: 3.4 [#1] byte addressable unit of data storage large enough to hold any member of the basic character set of the execution environment [...] 3.5 [#1] character bit representation that fits in a byte AFAIK, effectively the same definition is part of the current C89 standard as well. > Most people think that byte is a synonym for 8 bits. I'm aware of that. But that doesn't make it correct, at least not from a 'language-lawyer' point of view. Actually, the equivalence of 8 bits being a byte is a rather recent invention, compared to the use of the 'byte' in computing. There have been 7-bit bytes, 9-bit ones. 8 bits just happens to be *so* common today that most of us, esp. those who grew up on 8-bit home-computers, tend to think it's the only possible definition. You see, there *is* a reason that the 8-bit byte is called 'octet' in several other standards (X11, MIME, e.g.): the term 'byte' really isn't specific enough, if a standard writer wants to nail down an implementor to do exactly what the standard says. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.