Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!think!ima!haddock!karl From: karl@haddock Newsgroups: net.lang.c Subject: Unsigned promotions Message-ID: <86900028@haddock> Date: Mon, 25-Aug-86 14:41:00 EDT Article-I.D.: haddock.86900028 Posted: Mon Aug 25 14:41:00 1986 Date-Received: Mon, 25-Aug-86 22:58:06 EDT Lines: 12 Nf-ID: #N:haddock:86900028:000:497 Nf-From: haddock!karl Aug 25 14:41:00 1986 When an unsigned char or unsigned short is used in an expression, is it promoted to int or unsigned int? (It is zero-extended either way, but the type of the result is significant, e.g. in a divide.) K&R seems not to mention unsigned datatypes other than int. My local C compiler promotes it to unsigned. X3J11 (May, 1986) says the result is int. Do some existing compilers promote to signed int? What does H&S say? Karl W. Z. Heuer (karl@haddock.isc.com; ima!haddock!karl), The Walking Lint