I
Igor.Starodubsky
Hi all,
The problem is to catch all explicit and implicit casts from given
type pointer to void pointer.
e.g
class FooClass {};
void* foo()
{
static FooClass* fooObject;
return fooObject;
}
ugly solution is:
I've used this command to make the substitution of void* for int* in
sources.
find . -execdir sed -i "s/void\s*\*/int\*/g" {} \;
Then I've made the compilation with -k option of make utility(Continue
as much as possible after an error) and grep for error "cannot convert
'FooClass*' to 'int*'". So I've caught "all" explicit/implicit casts
from FooClass pointer to void pointer at compile time.
Do you have better idea/solution for this problem?
os: linux
compiler: g++
The problem is to catch all explicit and implicit casts from given
type pointer to void pointer.
e.g
class FooClass {};
void* foo()
{
static FooClass* fooObject;
return fooObject;
}
ugly solution is:
I've used this command to make the substitution of void* for int* in
sources.
find . -execdir sed -i "s/void\s*\*/int\*/g" {} \;
Then I've made the compilation with -k option of make utility(Continue
as much as possible after an error) and grep for error "cannot convert
'FooClass*' to 'int*'". So I've caught "all" explicit/implicit casts
from FooClass pointer to void pointer at compile time.
Do you have better idea/solution for this problem?
os: linux
compiler: g++