When i rename a symbol I usually fail to rename all occurences in my code manually.
When GCC reports error about this, it only tells "(each undeclared symbol reported only once)".
I want it to report all occurences. Is it possible?
My first question is: why? When I change the name of a symbol, I do it using global search and replace: in my editor (vim):
:argdo %s/\<oldname\>/newname/g
(This changes all instances of oldname into newname, in all files in
the editors list of arguments, but only if oldname is a complete
symbol; i.e. someoldname will not be changed.)
If the name is a global, then I'll do the same from the shell, using
sed:
for f in $(find root -name '*.hh' -o -name '*.cc')
do
sed 's/\<oldname\>/newname/g' $f > tmp && mv tmp $x
done
If you're under Windows, I believe VS has similar possiblities, with a global search and replace over all source files in the solution.
You don't compile to find errors you know are there; it's generally easier to fix them first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With