https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104237

--- Comment #19 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Chengnian Sun from comment #18)
> Hello folks,
> 
> While testing gcc with -fcompare-debug, I was asked a question which puzzled
> me as well. 
> 
> What if we always enable -g, and use 'strip' to remove debug information
> from the binary file? Then we do not need to pay much attention to bugs
> detected by -fcompare-debug.

because -g has a compile time overhead and even an assembler time overhead; in
some cases the debugging informationg is huge even for small programs. Plus
there are different levels of -g: -g1, -g2, and -g3 (-g is the same as -g2). So
which one would you enable by default?

Reply via email to