This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-1.1.2 -O flag and macro bug
- To: takeshi at SoftAgency dot co dot jp
- Subject: Re: egcs-1.1.2 -O flag and macro bug
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Thu, 29 Apr 1999 00:24:13 -0600
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
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