Date: Tue, 9 Jan 2001 18:30:36 -0500 (EST) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Mike Smith <msmith@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/include bus.h Message-ID: <200101092330.SAA27353@khavrinen.lcs.mit.edu> In-Reply-To: <200101092237.f09MbvJ01112@mass.osd.bsdi.com> References: <200101091817.f09IHng10622@freefall.freebsd.org> <200101092237.f09MbvJ01112@mass.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 09 Jan 2001 14:37:57 -0800, Mike Smith <msmith@FreeBSD.org> said: > Where a constant is of a known type, one should avoid "UL" in favour of > the real type, eg. (~(bus_addr_t)0). There's too much "long" in the bus > code already. 8( This will cause strange, hard-to-diagnose bugs arising from sign-extension happening at the wrong times, from the wrong bits being trimmed off in various places, etc. Having said that, your example is indeed the right way to express the concept, just not for the reason you state. C89 guarantees that `unsigned long' is the longest integral type. C99 breaks this promise, but we'll probably sweep that under the carpet for all types but file sizes. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101092330.SAA27353>