public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/13122] New: Get wrong value when do a digital computing
@ 2011-08-23 14:48 teawater at gmail dot com
  2011-08-23 19:33 ` [Bug exp/13122] " schwab@linux-m68k.org
  2012-02-06 15:21 ` tromey at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: teawater at gmail dot com @ 2011-08-23 14:48 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13122

             Bug #: 13122
           Summary: Get wrong value when do a digital computing
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: exp
        AssignedTo: unassigned@sourceware.org
        ReportedBy: teawater@gmail.com
    Classification: Unclassified


(gdb) p (1314109286*1000000000+216493710)-(1314109272*1000000000+53467812)
$1 = 1278124010

The right value is: 14163025898

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug exp/13122] Get wrong value when do a digital computing
  2011-08-23 14:48 [Bug exp/13122] New: Get wrong value when do a digital computing teawater at gmail dot com
@ 2011-08-23 19:33 ` schwab@linux-m68k.org
  2012-02-06 15:21 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: schwab@linux-m68k.org @ 2011-08-23 19:33 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13122

--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2011-08-23 14:47:46 UTC ---
$ echo '#include <stdio.h>
int x = (1314109286*1000000000+216493710)-(1314109272*1000000000+53467812);    
int main (void) { printf ("%d\n", x); }' | gcc -xc -
<stdin>:2:20: warning: integer overflow in expression [-Woverflow]
<stdin>:2:54: warning: integer overflow in expression [-Woverflow]
$ ./a.out 
1278124010

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug exp/13122] Get wrong value when do a digital computing
  2011-08-23 14:48 [Bug exp/13122] New: Get wrong value when do a digital computing teawater at gmail dot com
  2011-08-23 19:33 ` [Bug exp/13122] " schwab@linux-m68k.org
@ 2012-02-06 15:21 ` tromey at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at redhat dot com @ 2012-02-06 15:21 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=13122

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tromey at redhat dot com
         Resolution|                            |INVALID

--- Comment #2 from Tom Tromey <tromey at redhat dot com> 2012-02-06 15:21:04 UTC ---
On the basis of Andreas' reply, I'm marking this as invalid.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-02-06 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23 14:48 [Bug exp/13122] New: Get wrong value when do a digital computing teawater at gmail dot com
2011-08-23 19:33 ` [Bug exp/13122] " schwab@linux-m68k.org
2012-02-06 15:21 ` tromey at redhat dot com

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