Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Aug 2010 15:54:11 -0700
From:      perryh@pluto.rain.com
To:        kc5vdj.freebsd@gmail.com
Cc:        freebsd-usb@freebsd.org
Subject:   Re: writing usb drivers under 8.x
Message-ID:  <4c799393.wU/d2YpTieErDrD7%perryh@pluto.rain.com>
In-Reply-To: <4C78B0F4.4020002@gmail.com>
References:  <4C76AB76.4070806@gmail.com> <201008270856.43512.hselasky@c2i.net> <4C777D12.3040900@gmail.com> <201008271053.27731.hselasky@c2i.net> <4C78B0F4.4020002@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Jim Bryant <kc5vdj.freebsd@gmail.com> wrote:

> what kind of idiot defines a constant assignment for a 32k buffer as a 
> 15 bit left shift of 1?
>
> clever, yes.  but in production, stupid.
>
> a constant should be just that, a constant, and thus require no 
> computation at runtime.

Er, did you bother to look at the generated code before spouting off?
Most compilers, even as far back as K&R 1st edition, will compute
constant expressions like that at compile time.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4c799393.wU/d2YpTieErDrD7%perryh>