Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Nov 1995 18:39:32 -0600 (CST)
From:      peter@taronga.com (Peter da Silva)
To:        hackers@freebsd.org
Subject:   Re: How long is long?
Message-ID:  <199511250039.SAA25262@bonkers.taronga.com>
In-Reply-To: <199511241905.MAA10078@phaeton.artisoft.com> from "Terry Lambert" at Nov 24, 95 12:05:45 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> The size of long shall be greater than or equal to the sizeof int.  Your
> 128 says "greater than" and ignores "equal to".

That's fine. I believe that the standard is overcautious. I believe that the
original use of 32 bit longs in 3BSD was a mistake.

> My complaint is about the long >= int requirement on longs.

Yep. Should be "long > int".

> > Long doesn't and shouldn't mean "32 bits".

> Maybe not.  But *something* should mean "32 bits".

Whatever means "32 bits" should have the number "32" or the number "4" in
its name. That is, if you need a 32 bit value *specifically* then you
should use a native or derived type called "int32" or something similar.

> What about existing on-disk data?

Bailey Network Management uses derived types for all external data
structures.  I authored the coding standard.

It is a fundamental error to depend on implied sizes.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511250039.SAA25262>