Subject: Re: timeout issue in scsi drivers: mstohz()
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Andy Isaacson <adi@hexapodia.org>
List: tech-kern
Date: 04/05/2002 13:50:25
On Fri, Apr 05, 2002 at 12:14:59PM -0500, der Mouse wrote:
> > However (a + 1ull) is long long if a is unsigned long.
> 
> That sounds like a bug to me.  I suspect the Standard may not have
> anything to say about it because long long is a nonstandard type (ISTR
> hearing that the upcoming new C standard will change this - or is it
> actually a standard by now?).

Yes, ISO/IEC 9899:1999 ("ISO C99") has been ratified.  You can purchase
a PDF copy for about $18 on the ANSI website, or from
http://www.techstreet.com/cgi-bin/detail?product_id=232462

And yes, it does standardize 'long long'; I think 6.3.1.1 inserts long
long into the promotion hierarchy.  If I'm reading C99 correctly, given
	unsigned long a;
then
	(a + 1ull);
has type unsigned long long.  6.3.1.8 says

    [...] If both operands have signed integer types or both have
    unsigned integer types, the operand with the type of lesser integer
    conversion rank is converted to the type of the operand with greater
    rank.

-andy