🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1933

Problem with unsigned char in GCC 1.28 on Sun

#1933
From: Joe Weening
Date: Sun, 13 Nov 1988 21:34
17 lines
734 bytes
The following program prints the right value (106) when compiled with
-O, but prints 0 when compiled without -O.  This is with GCC 1.28 on
Sun-2 and Sun-3 systems.

main ()
{
  foo("abcdefghijklm",13);
}

foo(addr,len)
unsigned char *addr;
int len;
{
  int i;
  i = *(addr+9);
  printf("%d\n",i);
}
Technical Details
Message-ID: <8811132134.AA01547@Gang-of-Four.Stanford.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!GANG-OF-FOUR.STANFORD.EDU!weening

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!GANG-OF-FOUR.STANFORD.EDU!weening
From: weening@GANG-OF-FOUR.STANFORD.EDU (Joe Weening)
Newsgroups: gnu.gcc.bug
Subject: Problem with unsigned char in GCC 1.28 on Sun
Message-ID: <8811132134.AA01547@Gang-of-Four.Stanford.EDU>
Date: 13 Nov 88 21:34:44 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 17