wrong evaluation of question expressions
Jeffrey A Law
law@cygnus.com
Sun Jun 28 01:38:00 GMT 1998
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
More information about the Gcc-bugs
mailing list