svn commit: r332092 - in head/sys: amd64/amd64 sys x86/x86

Rodney W. Grimes freebsd at pdx.rh.CN85.dnsmgr.net
Sun Apr 8 02:47:39 UTC 2018


> On Fri, Apr 06, 2018 at 07:14:42AM -0700, Conrad Meyer wrote:
> > I like something like this for clarity.  But I don't see any reason
> > for these function-like macros instead of the more general definition
> > of an SI prefix constant multiple.  A multiple works with numeric
> > literals and variables alike.  Something like:
> 
> As Bruce had said, 1G is normally written as 1024 * 1024 * 1024 and this
> is clearer than 1 << 30.  Macros/functions like these are evil and bring
> more problems than they solve (again, as Bruce had explained).  GiB name
> is also ugly (correct spelling is GB).  IMHO the whole thing should just
> be removed.

I support this as well.  1K, 1M and 1G can all very easily be express as
products of 1024, and have been expressed that way for most of the life
of the BSD source code.

I would even support this being an addition to style(9).

> ./danfe

-- 
Rod Grimes                                                 rgrimes at freebsd.org


More information about the svn-src-head mailing list