Uninitialized externals and statics

Henry Spencer henry at utzoo.uucp
Sun Aug 27 08:25:05 AEST 1989


In article <609 at paperboy.OSF.ORG> dbrooks at osf.org (David Brooks) writes:
>Anyway, I had a question: what is this assumption about "all bits
>zero" for the common case of initializing ints?  I wonder if there's
>any machine out there that represents int 0 with some other bit
>pattern...

It would be difficult, probably impossible, to build an ANSI-conforming
C implementation for such a machine.  ANSI C leaves representation of most
data types largely up to the implementor, but integers are pinned down
fairly thoroughly and pretty well have to be binary using one of the
orthodox representations.  I believe the standard is flexible enough in
key places for one's-complement to work, but more radical departures
from current orthodoxy will have trouble.
-- 
V7 /bin/mail source: 554 lines.|     Henry Spencer at U of Toronto Zoology
1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list