www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 161] New: GDC prevents backend from removing dead functions

Date: Thu, 9 Oct 2014 13:20:34 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"


            Bug ID: 161
           Summary: GDC prevents backend from removing dead functions
           Product: GDC
           Version: development
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: Low
         Component: gdc
          Assignee: ibuclaw gdcproject.org
          Reporter: johannespfau gmail.com

Private functions which are never used could be removed by the GCC backend, but
we somehow prevent the backend from doing that.

Example: C
static void foo() {}
gcc -S -O test.c

private void foo() {}
gdc -S -O test.c

The problem is probably in d-decls.cc(FuncDeclaration::toSymbol) and is one of
(or a combination of) these: TREE_PUBLIC set, TREE_USED set, TREE_STATIC not

You are receiving this mail because:
You are watching all bug changes.
Oct 09 2014