
Hi Andreas ! I've tried to run the statechart examples and tests with gcc 4.0 using Boost.Build V2. The attached patch corrects some minor glitches: The examples don't run from the "run" directory because gcc's -rpath option is not used when using shared libraries. This is enabled by <hardcode-dll-paths>true The test Jamfile produces *tons* of warnings because -Wno--non-virtual-dtor is not set and detail/rtti_policy has an (empty) virtual function named "dummy" but no virtual destructor. I simply disabled this warning, but I'm not happy about it. It has been helpful in my own code in the past. Is there any chance to make the destructor virtual when a vtable is needed ? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * hunold@ive-mbh.de ! www.ive-mbh.de

Hi Juergen
I've tried to run the statechart examples and tests with gcc 4.0 using Boost.Build V2.
The attached patch corrects some minor glitches: The examples don't run from the "run" directory because gcc's -rpath option is not used when using shared libraries. This is enabled by <hardcode-dll-paths>true
Applied, thanks.
The test Jamfile produces *tons* of warnings because -Wno--non-virtual-dtor is not set and detail/rtti_policy has an (empty) virtual function named "dummy" but no virtual destructor.
I get no warnings whatsoever on mingw. libs/statechart/Jamfile.v2 looks as follows: project libs/statechart # The library ensures that all state destructors are only invoked on # the most-derived type, therefore state destructors do not need to # be virtual : requirements <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ; Shouldn't that take care of any warnings in test *and* example?
I simply disabled this warning, but I'm not happy about it. It has been helpful in my own code in the past. Is there any chance to make the destructor virtual when a vtable is needed ?
The destructors are not virtual for performance reasons (see comment above on how correctness is ensured). The vtable is needed for typeid, that's why there's a dummy. Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.

Hi Andreas ! Am Dingsdag 14 März 2006, 00:38 schrieben Sie:
Hi Juergen
I've tried to run the statechart examples and tests with gcc 4.0 using Boost.Build V2.
The attached patch corrects some minor glitches: The examples don't run from the "run" directory because gcc's -rpath option is not used when using shared libraries. This is enabled by <hardcode-dll-paths>true
Applied, thanks.
Good.
project libs/statechart # The library ensures that all state destructors are only invoked on # the most-derived type, therefore state destructors do not need to # be virtual
: requirements <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
Shouldn't that take care of any warnings in test *and* example?
Well, it works now. Fascinating. Maybe I missed an update from anon cvs. Or Volodya fixed some V2 bug. Sorry for the irritation :-))
I simply disabled this warning, but I'm not happy about it. It has been helpful in my own code in the past. Is there any chance to make the destructor virtual when a vtable is needed ?
The destructors are not virtual for performance reasons (see comment above on how correctness is ensured). The vtable is needed for typeid, that's why there's a dummy.
Yes, I read the comment. I understand that performance is quite critical. I just did not like the fact the I've got to disable this specific gcc warning. The real cure would be some gcc magic tom disable this specific warning for this one file only, like msvc has. Thanks for the explanation. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * hunold@ive-mbh.de ! www.ive-mbh.de
participants (3)
-
Andreas Huber
-
Juergen Hunold
-
Jürgen Hunold