Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.lang.c Subject: Re: sizeof a struc field Message-ID: <1989Oct20.192827.22495@twwells.com> Date: 20 Oct 89 19:28:27 GMT References: <7710@microsoft.UUCP> <11086@smoke.BRL.MIL> <131@dtoa3.dt.navy.mil> <11316@smoke.BRL.MIL> <1234@crdos1.crd.ge.COM> Organization: None, Ft. Lauderdale, FL Lines: 21 In article <1234@crdos1.crd.ge.COM> davidsen@crdos1.UUCP (bill davidsen) writes: : Here's what the standard says (3.3.3.4): : : The result is an integer constant. : I also really : wonder why sizeof doesn't return "unsigned int" but I suspect i wouldn't : like the answer. Watch that wording! The quoted material says that sizeof results in an integer constant, not that it results in a constant of type int. Sizeof returns something of type size_t, which must be unsigned. Unsigned of *some* type. It might be unsigned short :-) but I suspect that the intent was to permit unsigned long. --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com