Re: dead code identification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Hampton wrote:
I would like to identify dead/redundant code that is being optimized away by gcc. Is there a way to have gcc report the line number associated with this code ?

I guess someone should point out that some commercial compilers (Sun's comes to mind) issue warnings for unreachable code. IMO this would make a nice improvement to gcc.

As far as redundant code, though, redundant code can be more readable than the alternative (I've several times caught myself writing redundant code and hoping gcc would fold it in optimization).

--
Matthew
"It's ok, I forgive you. I often confuse cream cheese with happiness myself ;-)" -- Jeremy Whiting (responding to a rather strange yet amusing conversation I'd started; also, I agree with the sentiment)


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux