<div dir="ltr"><div dir="ltr">On Tue, Jun 25, 2019 at 1:20 AM Sven Barth via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Correct. Though considering that we're talking about *compile time* the <br>
compiler *could* treat consts (in {$J-} mode) as constants if pure <br>
functions are involved...<br></blockquote><div><br></div><div>I'd be fine with the {$J-} requirement (I tend to use {$J-} most of the time anyways, actually.)</div><div><br></div><div>Again, I'm aware all of this will take a while to implement, and will be an incremental process. Overall though I think proper compile-time constant initialization needs to be something `pure` eventually enables, as if it doesn't then it just becomes "slightly-different-inlining". (And like denisgolovan pointed out in another message, inlining should remain a separate concept that can be mixed with pure, or not mixed with it, depending on the use case. E.G. a C++ compiler will automatically inline basically anything at -O3, but it will not let you use a non-constexpr function to initialize an actual constexpr value.)</div></div></div>