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.


-- 
           Summary: Need for attributes to tag code blocks so optimiser can
                    remove more code.
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: oiaohm at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41682

Reply via email to