cint problem (bug ???)

Christian Guenther (christian.guenther@icn.siemens.de)
Fri, 09 Oct 1998 12:52:57 +0200


Hello,
I found some strange behaviour with cint,
as the following trivial program demonstrates.
It seems that there is an overflow occuring !?

Any ideas are very appreciated ?
Thank you in advance !

===================================================================

-> cat /tmp/t1.cc
#include <iostream.h>

main() {

unsigned int i = 2087856000;
unsigned int j = 126230400;

cout << "i = " << i << ",j = " << j << ", i+j = " << i+j << endl;

}

-> g++ -Wall -pedantic /tmp/t1.cc -o /tmp/t1
-> /tmp/t1
i = 2087856000,j = 126230400, i+j = 2214086400

-> cint /tmp/t1.cc
i = 2087856000,j = 126230400, i+j = -2080880896

-> cint -v

cint : C/C++ interpreter
Copyright(c) : 1991~1996 [hp] Hewlett-Packard-Japan
Author : Masaharu Goto (gotom@jpn.hp.com)
Copyright(c) : 1995~1998 Masaharu Goto (MXJ02154@niftyserve.or.jp)
revision : 5.13.74, Sep 19 1998 by M.Goto

...

===================================================================

-------------------------------------------------------------------------
Christian Günther __o
SIEMENS AG, OeN TR SW D4 _`\<,_ Phone: +49-89-722-41782
Hofmannstr. 51, D-81359 Muenchen (_)/ (_) Fax: +49-89-722-36703

Christian.Guenther@oen.siemens.de
-------------------------------------------------------------------------
The software required `Windows 95 or better', so I installed Linux.