Michael Nguyen writes:

Lloyd Zusman writes:

Sam Varshavchik <[EMAIL PROTECTED]> writes:

[snip]

Please run this code, and let us know what happens.

% cat >sam.c <<EOD #include <stdio.h> void main() { int i;

 for (i=0; i<256; i++)
 {
  char c=(char)i;
  unsigned char uc=(unsigned char)i;

   if ( (((c >> 7) & 1) != ((uc >> 7) & 1)) ||
        ((c & 15) != (uc & 15)))
  {
   printf("Sam is wrong\n");
   exit(0);
  }
 }
 printf("Sam is right\n");
 exit(0);
}
EOD
% gcc -o sam sam.c
sam.c: In function `main':
sam.c:4: warning: return type of `main' is not `int'
% ./sam
Sam is wrong
%

Either you're kidding me, or your C compiler has a bug.

I got the same result.

Then your C compiler has a bug.



Attachment: pgpW8nnjXNvmS.pgp
Description: PGP signature

Reply via email to