Type of expression sizeof(x)

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Sep 22 06:56:31 AEST 1989


In article <256 at servio.UUCP> penneyj at servio.UUCP (D. Jason Penney) writes:
>Our conversation with DEC re this bug was extremely unhelpful.  They claim that
>the return type of a sizeof() expression is system-dependent.

Why was that unhelpful?  They're right.  It's not DEC's bug.

AT&T UNIX C compilers changed the type of sizeof from int to unsigned
int many years ago.

The ANSI standard for C will require that the type of sizeof be an
unsigned integral type (so it might be unsigned long on some systems).



More information about the Comp.unix.ultrix mailing list