pragma(__ctfe)

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Sep 28 06:04:51 UTC 2023


On 28/09/2023 6:04 PM, ryuukk_ wrote:
> Why couldn't the compiler already guess this?
> 
> To me a simple static analysis would be enough and better, or is it too 
> slow? time saved not generating what's not used could offset time spent 
> on the analysis?

When you do multi-step builds (which are common), this would result in 
link failures. Since you don't have all the code, you can't do any 
analysis without failures being possible. It would make druntime and 
Phobos fail to link correctly with a giant list of missing symbols.


More information about the Digitalmars-d mailing list