writing usb drivers under 8.x

Gary Dunn osp at aloha.com
Sun Aug 29 01:53:30 UTC 2010


Why not just do the assignment? Save memory?

perryh at pluto.rain.com wrote:

>Jim Bryant <kc5vdj.freebsd at 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.
>_______________________________________________
>freebsd-usb at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-usb
>To unsubscribe, send any mail to "freebsd-usb-unsubscribe at freebsd.org"
>


More information about the freebsd-usb mailing list