Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: soundex algorithm wanted Message-ID: <3421@umcp-cs.UUCP> Date: Sun, 14-Sep-86 04:51:07 EDT Article-I.D.: umcp-cs.3421 Posted: Sun Sep 14 04:51:07 1986 Date-Received: Sun, 14-Sep-86 23:38:47 EDT References: <27@houligan.UUCP> <672@bnrmtv.UUCP> <1239@whuxl.UUCP> <3266@umcp-cs.UUCP> <1244@whuxl.UUCP> Reply-To: chris@umcp-cs.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 22 >In article <3266@umcp-cs.UUCP> I wrote: >>All the compilers I have used ignore the `register' on `register >>char' declarations. ... Is there ever any reason to declare a variable >>`register char' rather than `register int'? Are there any extant >>compilers for which the latter will generate *worse* code? In article <1244@whuxl.UUCP> mike@whuxl.UUCP (BALDWIN) writes: >On a 3B20, `register char c' is indeed put in a register .... >Of course there's a reason for declaring a variable as char >instead of int; if it is used as a char, it should be declared char. I agree, in principle; this is just a part of saying what you mean. I meant to ask `is there ever any reason, other than saying what you mean'. I have, since I discovered that the 4BSD compiler ignores `register' on `char's, given in to expediency. I suppose I was really looking for an excuse to work on the compiler. Well, now I have one: Sun's compiler does indeed generate better code, in some cases, for `register char's than for `register int's. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu