D.gnu - [Bug 161] New: GDC prevents backend from removing dead functions
- via D.gnu (34/34) Oct 09 2014 Date: Thu, 9 Oct 2014 13:20:34 +0100
Date: Thu, 9 Oct 2014 13:20:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" http://bugzilla.gdcproject.org/show_bug.cgi?id=161 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? -- You are receiving this mail because: You are watching all bug changes.
Oct 09 2014