For 100% assurance you need a SCIENTIFIC way to validate and trust a beautifier program. The method described in this section will enable the beautifier program to be accepted as "trust-worthy" and reliable.
In order to verify that beautifier programs like bcpp, indent or cb is not damaging or changing the input source-code after formatting, you can use the shell script verification program or use the following technique -
Generate the object code from the original input source code using the compiler -
g++ -c myprogram.cpp
Save this file -
mv myprogram.o myprogram_orig.o
Now run bcpp -
bcpp myprogram.cpp
g++ -c myprogram.cpp
Now use the unix 'diff' command to compare the two object files -
diff myprogram.o myprogram_orig.o
Also you can use the assembler output instead of object output in compiler. Like -
g++ -S myprogram.cpp
diff myprogram.s myprogram_orig.s
It is strongly recommended that you do these two steps every time you run beautifier programs like bcpp, indent or cb.