From owner-freebsd-bugs Fri Oct 29 13: 7:26 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from postal1.lbl.gov (postal1.lbl.gov [128.3.7.82]) by hub.freebsd.org (Postfix) with ESMTP id 2A93D151DC for ; Fri, 29 Oct 1999 13:07:23 -0700 (PDT) (envelope-from jin@george.lbl.gov) Received: from SpamWall.lbl.gov (localhost [127.0.0.1]) by postal1.lbl.gov (8.9.3/8.9.3) with ESMTP id NAA16236 for ; Fri, 29 Oct 1999 13:07:22 -0700 (PDT) From: jin@george.lbl.gov Received: from george.lbl.gov (george.lbl.gov [131.243.2.12]) by SpamWall.lbl.gov (8.9.3/8.9.3) with ESMTP id NAA16217; Fri, 29 Oct 1999 13:07:20 -0700 (PDT) Received: (from jin@localhost) by george.lbl.gov (8.9.1b+Sun/8.9.1) id NAA26819; Fri, 29 Oct 1999 13:07:20 -0700 (PDT) Date: Fri, 29 Oct 1999 13:07:20 -0700 (PDT) Message-Id: <199910292007.NAA26819@george.lbl.gov> To: nate@mt.sri.com Subject: Re: 'sizeof' C storage (was Re: bin/14472: date for Y#K) Cc: freebsd-bugs@FreeBSD.ORG, sheldonh@uunet.co.za Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > "long" seems to be a bad type definition in C program since it is not in > > a fixed variable size. I will not use it at a critical segment. > > No variable types are 'fixed' in C. On Win32, int is 32 bits, on Alpha > it's 64 bit. The only thing you can rely on is that short <= int <= > long. The relative sizes are unknown, unless you limit your code to a > certain hardware/software platform of known release. Maybe this should be changed now to make short=2Byte, long=4Byte, and int=register_size=pointer. We should not stay on something is bad, and follow it. Think about this -- if sizeof short == 4, most network code will be broken, since the 16-bit is critical to the TCP/IP stack. The new types, such as int16_t, int32_t, int##[#]_t, are in fixed sizes. I am not sure this is a tendnecy or there is some group working on it for new specification; but it seems that many compilers have such feature built-in right now. -Jin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message