[geos-devel] Pedantic build of GEOS
Mateusz Łoskot
mateusz at loskot.net
Mon Mar 20 17:28:35 EST 2006
Hi,
A few minutes ago, I tried to build GEOS with -pedantic and -ansi
switches on.
The only *errors* I got were related to extra semicolons at the end of
functions body, e.g.:
void foo()
{
//...
};
^^^ - extra semicolon
I removed them and did complete rebuild.
Then I made short analysis of warnings.
Almost all warnings were related to missing virtual destructors in base
classes that have some virtual member functions.
I reported it as a bug, a critical bug:
Bug #73 - Many classes have no virtual destructor but having virtual
member functions
I managed to identify 25 classes that need virtual destructors.
Is there any rationale for not adding virtual destructors?
I don't see any and I'd say it is pretty critical to add this
destructors, because it may cause serious bugs, even memory leaks.
After those destructors are added I think it would be helpful to add
-pedantic and -ansi switches to default set of compilator flags for GEOS.
Today, we were discussing about it with strk and Norman on the #postgis
channel and there was no consensus but I'd stronlgy suggest to add those
flags. Why not to help compiler help us :-)))
Cheers
--
Mateusz Łoskot
http://mateusz.loskot.net
More information about the geos-devel
mailing list