This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-1.1.2 -O flag and macro bug



  In message <14118.58200.176215.39441F@mail.SoftAgency.co.jp>you write:
  > --Multipart_Wed_Apr_28_19:30:48_1999-1
  > Content-Type: text/plain; charset=US-ASCII
  > 
  > Hello,
  > When compile next test1.c file with -O options, egcs create incorrect code.
  > but without -O option, code is correct.
  > this test1.c must show `1', but, binary created with -O option return `0'.
  > 
  > === test1.c ===
  > #include <stdio.h>
  > typedef unsigned char uchar;
  > #define issjishead(c) ((0x81<=(uchar)(c) && (uchar)(c)<=0x9f) || (0xe0<=(uc
  > har)(c) && (uchar)(c)<=0xfc))
  > int main()
  > {
  >   int a = -107;
  >   printf("%d\n", issjishead(a));
  > }
This works fine in the current snapshots.

jeff

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]