Dear Masaharu, I am using cint for a quite some time now (with pleasure :-), and I think I found a little bug. Maybe it is a known limitation? Anyway, I think there is a problem that a destructor of a temporary object is called, even though the constructor was never called. This happens in a statement with the logical && operator: when the left side is false, the right side will not be evaluated (according to C/C++ rules). When using ( 1 && ... ) in the attached example, the right side produces a temporary object, which is later destructed. but when I use ( 0 && ...) the right side does not produce a temporary object, but the destructor seems to be called anyway. I can reproduced the problem with an older version 5.14.50, but also with 5.14.79 and 5.14.85. Attached is the code that produces the problem. Below is the output with 5.14.85/Linux. The output differs sometimes, but in all cases the number of d'tors is too high. cint> { f(); } foo-ctor: 7 foo-dtor: 7 foo-dtor: 1077300136 foo-dtor: 1077300136 Segmentation fault Thanks! Christoph
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:44 MET