https://issues.dlang.org/show_bug.cgi?id=18641
--- Comment #8 from Rainer Schuetze <[email protected]> --- (In reply to Manu from comment #6) > Ohhh wow. Interesting hack! > Does C++ do anything like that? There is "function level linkage" which puts each function in a COMDAT but that is done by dmd anyway. I suspect using object files instead helps to split the DATA segment, too. > > What sort of functions are generated but never called? > I kinda imagine that generating a function would imply you intend to call > it... what other mechanisms generate functions but don't call them? Does > CTFE emit a lot of these? In a library there can be many function never being called. C solved this by putting every function in its own source file, but that's sometimes almost impossible in D, e.g. for struct member functions. > > It sounds like this is a problem that could be addressed in DMD... like, it > should be able to keep a record of whether each function was generated by a > mechanism that should or shouldn't add it to the object's symbol table? That would be great, but it's a different issue, e.g. https://issues.dlang.org/show_bug.cgi?id=18238 or https://issues.dlang.org/show_bug.cgi?id=18774 --
