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 D: -------------- 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 set?