1

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?

Palace Chan
  • 8,845
  • 11
  • 41
  • 93
  • Take a look at this [Useful GCC flags for C](http://stackoverflow.com/questions/3375697/useful-gcc-flags-for-c), even though it says C, most of it applies to g++ as well. – Shahbaz Jun 20 '12 at 17:09

1 Answers1

1

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

Wonderful place for all wonderful options

nav_jan
  • 2,473
  • 4
  • 24
  • 42