Testing removal of ifdef or configure checks
Revision as of 06:48, 14 March 2020 by Abartlet (mention that this gets us cpp output (help wiki search))
#ifdef removal is risky
Large-scale removal of "unused" ifdef or the configure checks that produce #defines is an important, but risky task.
It is difficult (and time consuming) to prove that the code is unused and that there is no change to the compiled output.
A script to help
Getting the results
git checkout origin/master git clean -x -f -d CC="gcc -E" ./configure.developer && make -j mv bin /tmp/master-bin git checkout newbranch git clean -x -f -d CC="gcc -E" ./configure.developer && make -j
Reading the results
dirdiff /tmp/master-bin bin
diff -ur --ignore-matching-lines="^#" /tmp/master-bin/ bin> /tmp/diff