public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4938: bad warnings about signed and unsigned
@ 2001-11-20  0:16 jsm28
  0 siblings, 0 replies; 4+ messages in thread
From: jsm28 @ 2001-11-20  0:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-gnats, gcc-prs, inouk, jsm28, nobody

Synopsis: bad warnings about signed and unsigned

State-Changed-From-To: open->feedback
State-Changed-By: jsm28
State-Changed-When: Sat Nov 24 03:05:01 2001
State-Changed-Why:
    The manual clearly explains, section "Incompatibilities",
    why 2147483648 is unsigned and so -2147483648 is positive.
    Could you please let us know where you looked in the manual
    to find information about this, and how we might improve
    the manual to make it easier to find, so that you would
    have found it without reporting this as a bug?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4938&database=gcc


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

* Re: c/4938: bad warnings about signed and unsigned
@ 2002-07-22 13:17 neil
  0 siblings, 0 replies; 4+ messages in thread
From: neil @ 2002-07-22 13:17 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, inouk, jsm28, nobody

Synopsis: bad warnings about signed and unsigned

State-Changed-From-To: feedback->closed
State-Changed-By: neil
State-Changed-When: Mon Jul 22 13:17:35 2002
State-Changed-Why:
    No feedback, not a bug.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4938


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

* Re: c/4938: bad warnings about signed and unsigned
@ 2001-11-20  1:06 jsm28
  0 siblings, 0 replies; 4+ messages in thread
From: jsm28 @ 2001-11-20  1:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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

From: jsm28@gcc.gnu.org
To: gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
  inouk@igt.net, jsm28@cam.ac.uk, nobody@gcc.gnu.org
Cc:  
Subject: Re: c/4938: bad warnings about signed and unsigned
Date: 24 Nov 2001 11:05:01 -0000

 Synopsis: bad warnings about signed and unsigned
 
 State-Changed-From-To: open->feedback
 State-Changed-By: jsm28
 State-Changed-When: Sat Nov 24 03:05:01 2001
 State-Changed-Why:
     The manual clearly explains, section "Incompatibilities",
     why 2147483648 is unsigned and so -2147483648 is positive.
     Could you please let us know where you looked in the manual
     to find information about this, and how we might improve
     the manual to make it easier to find, so that you would
     have found it without reporting this as a bug?
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4938&database=gcc


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

* c/4938: bad warnings about signed and unsigned
@ 2001-11-19 21:29 inouk
  0 siblings, 0 replies; 4+ messages in thread
From: inouk @ 2001-11-19 21:29 UTC (permalink / raw)
  To: gcc-gnats


>Number:         4938
>Category:       c
>Synopsis:       bad warnings about signed and unsigned
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 23 19:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     inouk@igt.net
>Release:        unknown-1.0
>Organization:
>Environment:
Debian GNU/Linux GCC version 2.95 and 3.0
>Description:
The range of signed int is between -2147483648 and  2147483647

unsigned int between 0 and 4294967295

here a sample code:

      1 int main(void) {
      2
      3   unsigned int test;
      4   int test1;
      5
      6   test  = 4294967295;
      7   test  = 2147483648;
      8   test  = 2147483647;
      9
     10   test1 = 2147483647;
     11   test1 = -2147483648;
     12   test1 = -2147483647;
     13 }

I compile this and I have:
gcc t2.c
t2.c: In function `main':
t2.c:6: warning: decimal constant is so large that it is unsigned
t2.c:7: warning: decimal constant is so large that it is unsigned
t2.c:11: warning: decimal constant is so large that it is unsigned

I have a little difference with short, I never see warnings.

signed short: -32768 to 32767
unsigned short: 0 to 65535

sample code:
      1 int main(void) {
      2
      3   unsigned short test;
      4   short test1;
      5
      6   test  = 65535;
      7
      8   test1 = 65535;
      9   test1 = 32767;
     10 }

nothing about warning.  But, i "overflowed" test1 (in line 8).
>How-To-Repeat:
go to description
>Fix:
Better handling warnings :)
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-07-22 20:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-20  0:16 c/4938: bad warnings about signed and unsigned jsm28
  -- strict thread matches above, loose matches on Subject: below --
2002-07-22 13:17 neil
2001-11-20  1:06 jsm28
2001-11-19 21:29 inouk

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