Xref: utzoo gnu.gcc.bug:2171 comp.unix.xenix:10825 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!zaphod.mps.ohio-state.edu!sunybcs!dsinc!netnews.upenn.edu!vax1.cc.lehigh.edu!vlsi3b15!lehi3b15!jsnyder From: jsnyder@lehi3b15.csee.Lehigh.EDU (Jay Snyder) Newsgroups: gnu.gcc.bug,comp.unix.xenix Subject: GCC Bug under SCO Xenix/386 Message-ID: <864@lehi3b15.csee.Lehigh.EDU> Date: 29 Mar 90 08:02:04 GMT Followup-To: gnu.gcc.bug Organization: CSEE Dept. Lehigh University, Bethlehem, PA Lines: 39 The following is a piece of code that I use for a primitive password encoding scheme in my BBS software: encodepw(pw,name) char *pw,*name; { char i,ii; ii=0x15;i=0; while (*pw) { if (i>strlen(name)) i=0; *pw=*pw^(0x1f & name[i++])^(i++); *pw=*pw-5; if (*pw<'!') *pw=*pw+32; if (*pw==':') *pw='$'; ++pw; } } here is the output from input: name="Username", passwd="password" output from cc code: "_bstyvoj" output from gcc code: "`atszupi" note that the gcc code is make each character of the output 1 less numerically. Anybody have any suggestions. Also, I compiled the same code on an AT&T 3B15 running SYSV R3.1.1 and the results were the same as from cc on SCO. My conclusion is that gcc has a bug. -- ==================================================== Jay A. Snyder jsnyder@lehi3b15.csee.lehigh.edu CSEE Dept. jsnyder%gdx@lehi3b15.csee.lehigh.edu Lehigh University