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: wrong evaluation of question expressions



  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



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