I have found -E very useful to see preprocessor output and debug macros, and I have seen -fdump-class-hierarchy to look at the v-tables of a class hierarchy...I know there are flags to dump asm output as well..what are some other widely (or perhaps a bit unknown but very handy) flags akin to these?
Few flags which I like:
-x language
: used to compile file with extension other than .c or .cpp
-s
- dump asm.
-g
- debug build.
gcc -O3 -Q --help=optimizers | grep disabled
- will give you all optimization flags which remain diabled even after -O3