Xref: utzoo comp.lang.c:22131 comp.unix.ultrix:1756 Path: utzoo!attcan!utgpu!watmath!iuvax!rutgers!uwvax!rang From: rang@cs.wisc.edu (Anton Rang) Newsgroups: comp.lang.c,comp.unix.ultrix Subject: Re: Type of expression sizeof(x) Message-ID: Date: 21 Sep 89 16:33:50 GMT References: <256@servio.UUCP> Organization: UW-Madison CS department Lines: 18 In-reply-to: penneyj@servio.UUCP's message of 19 Sep 89 21:28:06 GMT In article <256@servio.UUCP> penneyj@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@cs.wisc.edu | | University of Wisconsin--Madison | | +----------------------------------+------------------+ "You are in a twisty little maze of Unix versions, all different."