Jump to content

Dead-code elimination

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 192.169.41.46 (talk) at 11:55, 11 February 2004. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Remove redundant or dead code as shown in this example

void foo() {

 int a = 24;
 int b = 25; /* Unused in this function */
 int c = a <<2;
 return;
 b = 24; /* Not reachable and hence dead code */

}