public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/1056: spurious warning on implicit conversion followed by promotion and comparison
@ 2002-11-20 18:53 Wolfgang Bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Bangerth @ 2002-11-20 18:53 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Wolfgang Bangerth <bangerth@apex68.ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: c++/1056: spurious warning on implicit conversion followed by promotion and comparison
Date: Thu, 14 Nov 2002 14:35:06 -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] 3+ messages in thread

* Re: c++/1056: spurious warning on implicit conversion followed by promotion and comparison
@ 2002-11-10 13:16 Wolfgang Bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Bangerth @ 2002-11-10 13:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Cc:  
Subject: Re: c++/1056: spurious warning on implicit conversion followed by
 promotion and comparison
Date: Sun, 10 Nov 2002 15:16:47 -0600 (CST)

 This report is about this code:
 ---------------------------------------
 struct X {
   operator unsigned short () const;
 };
 
 int main() {
   X s;
   unsigned long l;
 
   if (l == s);
   if (s == l);
 
   return 0;
 }
 ------------------------------
 and the following warnings:
 tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/gcc -W -Wall -c x.cc
 x.cc: In function `int main()':
 x.cc:9: warning: comparison between signed and unsigned integer expressions
 x.cc:10: warning: comparison between signed and unsigned integer expressions
 
 I had initially thought that this may be due to argument promotion to a 
 signed type from the unsigned short the conversion operator returns, but 
 then the same should happen when we define "s" as an unsigned short right 
 from the start. However, this makes the warning go away. So I don't 
 know...
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 


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

* Re: c++/1056: spurious warning on implicit conversion followed by promotion and comparison
@ 2001-08-12  9:28 lerdsuwa
  0 siblings, 0 replies; 3+ messages in thread
From: lerdsuwa @ 2001-08-12  9:28 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, martin.dorey, nobody

Synopsis: spurious warning on implicit conversion followed by promotion and comparison

State-Changed-From-To: open->analyzed
State-Changed-By: lerdsuwa
State-Changed-When: Sun Aug 12 09:28:01 2001
State-Changed-Why:
    Confirm as a bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1056&database=gcc


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-20 18:53 c++/1056: spurious warning on implicit conversion followed by promotion and comparison Wolfgang Bangerth
  -- strict thread matches above, loose matches on Subject: below --
2002-11-10 13:16 Wolfgang Bangerth
2001-08-12  9:28 lerdsuwa

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).