seems to be some problem with the handling of operator<<(i+j).
The following lines work ok:
unsigned int k =3D i + j;
cout << "i =3D " << i << ",j =3D " << j << ", i+j =3D " << k << endl;
printf("i =3D %u, j =3D %u, i+j =3D %u\n", i, j, i+j);
I think Masaharu (the author of CINT) will get back to you soon.
Cheers, Fons.
Christian Guenther wrote:
> =
> Hello,
> I'm just evaluating cint for my own personal use and I found some reall=
y
> strange behaviour, as the following trivial program demonstrates.
> =
> Do you have any ideas ?
> =
> Thank you in advance!!
> =
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> =
> -> cat /tmp/t1.cc
> #include <iostream.h>
> =
> main() {
> =
> unsigned int i =3D 2087856000;
> unsigned int j =3D 126230400;
> =
> cout << "i =3D " << i << ",j =3D " << j << ", i+j =3D " << i+j << end=
l;
> =
> }
> =
> -> g++ -Wall -pedantic /tmp/t1.cc -o /tmp/t1
> -> /tmp/t1
> i =3D 2087856000,j =3D 126230400, i+j =3D 2214086400
> =
> -> cint /tmp/t1.cc
> i =3D 2087856000,j =3D 126230400, i+j =3D -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=FCnther __o E-Mail: cg@uebemc.siemen= s.de > SIEMENS AG, OeN TR SW D4 _`\<,_ Phone: +49-89-722-417= 82 > Hofmannstr. 51, D-81359 Muenchen (_)/ (_) Fax: +49-89-722-367= 03 > -----------------------------------------------------------------------=---- =
Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland Phone: +41 22 7679248 E-Mail: Fons.Rademakers@cern.ch Fax: +41 22 7677910