Ok this is a really poor example bare with me. FILE * f; char * c; f = fopen(file,"r") c = fgetc(f) fclose(f); Let say this is a block of code inside a program c and f are never used anywhere else. Currently optimizer has no way to know that I know of that this code can be junked if if its not used. Programmer need to be able to place markers to this effect. One place were this could see some size reductions is in crt0.o with processing of command line. If the output is not used why do the processing. I hope I have assigned this to the right part.
Hm? This code has side-effects, so it cannot be safely removed by a compiler.
Just to expand on that, fopen might change errno and it also it might return NULL which case fgetc might cause the program to seg fault. etc.