<div class="gmail_quote">On 28 January 2012 20:39, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com">newshound2@digitalmars.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 1/28/2012 6:50 AM, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'd certainly like to be able to mark these functions CTFE to be sure no runtime<br>
code will ever be generated for them, and also, what can I do about CTFE<br>
imports? I don't want that import in my binary...<br>
</blockquote>
<br></div>
Being in your object file doesn't mean they make it into the binary. Optlink, for example, will remove unreferenced COMDATs.<br>
</blockquote></div><br><div>I still don't want it polluting my lib, and I also don't want the possibility that someone COULD link to it. It's simply not runtime code.</div><div>Additionally, while the code is still present in my lib, so must be the import that it makes use of...</div>
<div><br></div><div>I'd also like an error if the function were called outside of CTFE... so the CTFE attribute others have discussed seems like a good idea to me.</div>