Operating System - HP-UX
1833768 Members
1852 Online
110063 Solutions
New Discussion

Re: Using CADVISE for dead code detection

 
cawagner01
New Member

Using CADVISE for dead code detection

My group is currently running HP Code Advisor C.02.20 [Apr 18 2011] on an HP-UX 11.31 Itanium platform.  I am trying to use cadvise to detect any "dead code" in our various ANSI C applications.  Does anyone know what the cadvise compiler option is to perform this task?  BTW... I am using the c99 compiler.

 

Thank you in advance.

1 REPLY 1
Dennis Handly
Acclaimed Contributor

Re: Using CADVISE for dead code detection

What type of dead code?

If you have code after return or goto, there is a warning for that.

If you have dead functions, you can get warnings for statics.

They will be removed with +Oprocelim.  And -Wl,+dpv will tell you what.