Can someone please explain -allinst?

Rob T alanb at ucora.com
Thu Nov 21 14:21:56 PST 2013


On Thursday, 21 November 2013 at 21:20:59 UTC, Gary Willoughby 
wrote:
> Can someone explain the -allinst compiler flag for me please? 
> I've absolutely no idea what this flag does or when to use it.

I'm definitely not the best person to explain it, and I also 
would like to know more on this subject.

If my understanding is correct, allinst apparently means generate 
"all instances". From what I got from some postings on this issue 
is that DMD now tries to optimize away template bloat by not 
generating template instances that are not used.

I've had linker errors with auto ref parameters, and had to do 
some hacking to make them go away - basically I got rid of the 
"auto ref", but why these errors happened, and why I had to 
remove the auto is not certain, so whatever was done really needs 
to be much better explained.

Later I read in a posting that had I compiled with -allinst, then 
the linker errors would have gone away, but that was after I 
changed my code, so I don't know what effect it would have had.

--rt


More information about the Digitalmars-d-learn mailing list