[Cook] g++ and cook
Aryeh M. Friedman
aryeh at m-net.arbornet.org
Sun Jan 19 22:54:52 EST 2003
This may be more of a Peter issue then anything else.
If I create a new virtual member function in C++ (GCC) the entire source tree
that depends on that class needs to be recompiled (this is because the
virtual func table is created in a per instance and saved directly into
the object file for that instance). If it is not you often have "1 off"
type bugs (i.e. calls to old methods that are declared after the new
method in the class definition actually call the function befor them
[in order of decleration] and calls the the new function [if it was not
declared as virtual befor] call one after the new function). I can't think
of a good simple example for this but will work on making one and will post
it a follow up.
Yes I know c_incl should see this but for some reason it doesn't if you
have cascade includes such as:
in main.cpp
#include "includes.h"
main()
{
A *a;
...
}
in includes.h:
#include "a.h"
in a.h:
class A {
....
};
c_incl will not see that main.cpp depends on a.h. If you need to know the
reason why my project HAS to use this style of includes see GCC Bug report
#8907 at gcc.gnu.org.
In short is there any way for cook to scan the *.cpp file to see if it
depends on any classes that have change (assume that they are defined as
class.h).
--Aryeh
More information about the Cook-users
mailing list