Subject: Re: -current RAIDframe on alpha compile fails
To: None <current-users@netbsd.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 02/12/2000 09:38:57
On Fri, 11 Feb 2000, Aaron J. Grier wrote:
> Adding parenthesis to make the casts apply to the whole expression seems
> to fix it.  I'm curious why this is happening -- doesn't sizeof() return
> an int?

No, sizeof never returns an int.  It usually returns an unsigned
int or unsigned long, but a perverse implementation of the C language
could arguably use unsigned short or unsigned char.

ANSI/ISO 9899-1990 section 6.3.3.4 says:  "The value of the result is
implementation-defined, and its type (an unsigned integral type) is
size_t defined in the <stddef.h> header."

NetBSD used unsigned int on some architectures, and unsigned long on
others.

--apb (Alan Barrett)