public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/168: Spurious warning in 2.95.2
@ 2002-11-20 18:45 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2002-11-20 18:45 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/168; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/168: Spurious warning in 2.95.2
Date: Thu, 14 Nov 2002 14:23:51 -0600

 Re-confirmed with 3.3 CVS from 2002-11-10 and 3.2.1 pre from the same date.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/168: Spurious warning in 2.95.2
@ 2002-10-22 14:56 Wolfgang Bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2002-10-22 14:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/168; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>,
   <martin@loewis.home.cs.tu-berlin.de>, <tmwg-gcc@inxservices.com>
Cc:  
Subject: Re: c++/168: Spurious warning in 2.95.2
Date: Tue, 22 Oct 2002 16:48:33 -0500 (CDT)

 This is equally well a C report as a C++ report, since the problem appears 
 with both languages. The questionably code is
 ----------------------------------
 int main () {
   unsigned char      uc;
   unsigned short int usi;
   unsigned int       ui;
   if (uc + usi >= ui);
 }
 ----------------------------------
 and the report is that this issues an error
   t.i:5: warning: comparison between signed and unsigned
 
 As Jason pointed out, this is due to the fact that the left hand side is 
 converted to an integer. I have no opinion about the validity or the 
 warning, people should use casts to avoid this. I just wanted to share the 
 reduced code.
 
 This may be something for value range propagation, since then it would be 
 clear that the left hand side must be positive.
 
 Regards
   Wolfgang
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-14 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 18:45 c++/168: Spurious warning in 2.95.2 Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-10-22 14:56 Wolfgang Bangerth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).