This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/13122] Get wrong value when do a digital computing
- From: "schwab at linux-m68k dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 23 Aug 2011 14:47:46 +0000
- Subject: [Bug exp/13122] Get wrong value when do a digital computing
- Auto-submitted: auto-generated
- References: <bug-13122-4717@http.sourceware.org/bugzilla/>
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.