Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!mit-eddie!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Why should "sizeof" be unsigned? Message-ID: <6001@brl-smoke.ARPA> Date: Fri, 19-Jun-87 02:54:36 EDT Article-I.D.: brl-smok.6001 Posted: Fri Jun 19 02:54:36 1987 Date-Received: Mon, 22-Jun-87 02:47:20 EDT References: <1748@plus5.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Distribution: world Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 8 In article <1748@plus5.UUCP> hokey@plus5.UUCP (Hokey) writes: >None of these issues are key - it seems to me having sizeof return an >explicitly unsigned value violates "the principle of least astonishment". (a) AT&T "sizeof" has been this way for many years now. (b) Since sizeof(thing) inherently cannot be negative, an unsigned integer value for the sizeof operator seems exactly right. (c) Your example wasn't very convincing (to me at least).