Type of expression sizeof(x)

Anton Rang rang at cs.wisc.edu
Fri Sep 22 02:33:50 AEST 1989


In article <256 at servio.UUCP> penneyj at servio.UUCP (D. Jason Penney) writes:

>  It seems that the sizeof() is promoting the expression to be
>unsigned.
>
>Our conversation with DEC re this bug was extremely unhelpful.  They claim that
>the return type of a sizeof() expression is system-dependent.

On my uVAX 3200 with BSD 4.3, the 'cc' compiler defines sizeof() to
return a signed value.  'gcc' defines sizeof() to return an unsigned
value.  Is this defined in the ANSI draft standard?
   
+----------------------------------+------------------+
| Anton Rang (grad student)        | rang at cs.wisc.edu |
| University of Wisconsin--Madison |                  |
+----------------------------------+------------------+

"You are in a twisty little maze of Unix versions, all different."



More information about the Comp.unix.ultrix mailing list