This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug exp/13122] Get wrong value when do a digital computing


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]