This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: wrong evaluation of question expressions
- To: Jens Krinke <krinke at ips dot cs dot tu-bs dot de>
- Subject: Re: wrong evaluation of question expressions
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 28 Jun 1998 02:31:32 -0600
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <hmu39qckvf.fsf@infbssts.ips.cs.tu-bs.de>you write:
> The following message is a courtesy copy of an article
> that has been posted to gnu.g++.bug as well.
>
> Hi,
>
> the following bug shows up in egcs-of-the-day and in gcc-2.8.0,
> however, 2.7.2 is fine:
>
> main ()
> {
> int m=2;
> if (255 == (unsigned char)(m < 2 ? 0 : 255))
> printf("true\n");
> else
> printf("false\n");
> }
This seems to work with and without optimization with both egcs-1.0.x
and the current snapshots on an x86. It also worked fine with the
current snapshot on my hppa.
Maybe you could indicate exactly what target you're having trouble with
so that we can build a suitable cross compiler and debug this problem.
jeff