Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!seismo!vrdxhq!bms-at!stuart From: stuart@bms-at.UUCP Newsgroups: comp.lang.c Subject: Re: Conversions/casts one more time Message-ID: <312@bms-at.UUCP> Date: Wed, 10-Dec-86 20:35:16 EST Article-I.D.: bms-at.312 Posted: Wed Dec 10 20:35:16 1986 Date-Received: Sun, 14-Dec-86 09:26:40 EST References: <176@unisoft.UUCP> Organization: Business Management Systems, Inc., Fairfax, VA Lines: 17 Summary: I vote for a compiler bug In article <176@unisoft.UUCP>, wendyt@unisoft.UUCP (Wendy Thrash) writes: > printf("\tc = %x, (char)uc = %x, (char)ucf() = %x\n", > c, (char)uc, (char)ucf()); results in: > c = ffffffaa, (char)uc = ffffffaa, (char)ucf() = aa The compiler is broken and left out a cast. The values printed should all be the same, either as shown or 'aa' depending on whether 'char's are signed or unsigned. As to whether this is required by the X3J11 draft, I couldn't say. (I hope not.) -- Stuart D. Gathman <..!seismo!dgis!bms-at!stuart>