lehe <timlee126@xxxxxxxxx> writes: > I was wondering what is the purpose of using -ggdb3 and -O3 simultaneously > for gcc? One is for debug and the other is for optimization. Is this to > debug the optimized code? Can anyone point me to some reference explaining > this well? Thanks! Yes, that is to permit using the debugger on optimized code. The -g options control the generation of information for the debugger; they do not affect the generated code. The -O options control the amount of optimization applied when generating code; they do not affect the debug information. Ian