How Nested Functions Work, part 2

2009-09-18 Thread Walter Bright
http://www.reddit.com/r/programming/comments/9lxy5/how_nested_functions_clos

Re: Incremental compilation with DMD

2009-09-18 Thread Tom S
Walter Bright wrote: Also, if you specify a .obj file directly to the linker, it will put all of the symbols and data in that .obj file into the executable. The linker does NOT remove functions. What it DOES do is pull obj files out of a library to resolve unresolved symbols from other obj fi

Re: Incremental compilation with DMD

2009-09-18 Thread Walter Bright
Tom S wrote: I tested it on a single-module program before posting. Basically void main() {} and a single unused function void fooBar {}. With -g, something with the function's mangled name ended up in the executable. Without -g, the linker was able to remove the function (I ran a diff on a co