Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!carroll From: carroll@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: Why unsigned chars not default? Message-ID: <207600005@s.cs.uiuc.edu> Date: 23 Oct 88 16:29:00 GMT References: <9563@pur-ee.UUCP> Lines: 22 Nf-ID: #R:pur-ee.UUCP:9563:s.cs.uiuc.edu:207600005:000:1220 Nf-From: s.cs.uiuc.edu!carroll Oct 23 11:29:00 1988 In article <9563@pur-ee.UUCP> mendozag@ee.ecn.purdue.edu (Victor M Grado) writes: - (...) He claims the compilers are at fault and that all the compilers - should have 'unsigned char' as default for characters (...) Absolutely not! The reason is that 'unsigned' is a keyword in C, and 'signed' is not. I got screwed by this porting stuff to the 3b systems, where unsigned in the default, but the code thought signed was the default. There is no way to fix that. Where as, if you assumed unsigned, you merely have to put the 'unsigned' keyword in front of your chars. FLAME ON - This bug shows up in 'units', where the exponents are stored in chars, *signed* chars. On a 3b, this means that units can't deal with negative powers of dimensions, which is somewhat of a fatal flaw. Although there is a simple fix (change 'char' to 'short int'), AT&T, through several releases, *still* hasn't gotten it to work. Who knows what other bugs are floating around because of something like this? FLAME OFF Alan M. Carroll "How many danger signs did you ignore? carroll@s.cs.uiuc.edu How many times had you heard it all before?" - AP&EW CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!s.cs.uiuc.edu!carroll