<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 5:04 PM JF Bastien &lt;<a href="mailto:cxx@jfbastien.com">cxx@jfbastien.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 1:38 PM Rene Rivera &lt;<a href="mailto:grafikrobot@gmail.com" target="_blank">grafikrobot@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 3:31 PM Tony V E &lt;<a href="mailto:tvaneerd@gmail.com" target="_blank">tvaneerd@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Also, if you give me a function called std::compile(), that compiles code, it seems I can now write a compiler?</div><div><br></div><div>int main(int argc, char ** argv)</div><div>{</div><div>    return std::compile(argc, argv);</div><div>}<br></div><div><br></div><div>Wow, that was easy.</div><div>Can the paper explain what I&#39;m misunderstanding? (Or maybe it does explain, but I missed it)</div></div></blockquote><div><br></div><div>That&#39;s a correct understanding. And that&#39;s the one example I use in my implementation &lt;<a href="https://github.com/bfgroup/std_cpp/blob/master/example/std_cpp.cpp" target="_blank">https://github.com/bfgroup/std_cpp/blob/master/example/std_cpp.cpp</a>&gt;. I do try and explain the goals in the paper. In that it serves a dual purpose. But mainly it&#39;s a way to standardize the compiler options.</div></div></div></div></blockquote><div><br></div><div>Right, otherwise you&#39;d have to do:</div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div class="gmail_quote"><div><font face="monospace, monospace"><br></font></div></div></div><div><div class="gmail_quote"><div><div><font face="monospace, monospace">int main(int argc, char** argv) {</font></div></div></div></div><div><div class="gmail_quote"><div><div><font face="monospace, monospace">    std::system((std::string(&quot;clang &quot;) + argv[1]).c_str());</font></div></div></div></div><div><div class="gmail_quote"><div><div><font face="monospace, monospace">    return 0;</font></div></div></div></div><div><div class="gmail_quote"><div><div><font face="monospace, monospace">}</font></div></div></div></div></blockquote><div dir="ltr"><div class="gmail_quote"><div><br></div><div>;-)</div><div><br></div><div>More seriously, the selection of compiler options you&#39;ve chosen seem semi-random.</div></div></div></div></blockquote><div><br></div><div>First it&#39;s not random :-) It&#39;s the minimal to get basic actual compiling working and to show highlight some of the differences in link compatibility. Second, it&#39;s very incomplete. I&#39;ll keep adding options as I implement them from now until the mailing deadline (and keep implementing them afterwards for an R1 paper -- and so on). Third, I hope I can get some volunteers to help in adding options.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div> It would be useful to have a survey of existing compilers and their options, and some criteria to determine which should be supported here and which shouldn&#39;t.</div></div></div></div></blockquote><div><br></div><div>Selection criteria is indeed a hard problem. What&#39;s actually needed for core? And what can be delegated to the vendor specific realm?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Further, what&#39;s the expectation of the result of calling this function? Can I actually execute any code? How? Can you make sure that you take into account the restrictions various platforms have, such as requiring code authentication. It goes way beyond linkers.</div></div></div></div></blockquote><div><br></div><div>The proposal doesn&#39;t, intentionally, say anything about executing code. This is one of those &quot;implementation defined&quot; areas. Just like it is currently in the standard. If it&#39;s possible to execute code in some manner, either indirectly through an std::system equivalent or directly through JIT/DLL, is left for the implementor/compiler to document.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><font face="monospace, monospace">system</font> seems like a precedent for what you suggest, and in my experience <font face="monospace, monospace">system</font> isn&#39;t a precedent people want us to repeat.</div></div></div></div></blockquote><div><br></div><div>&quot;std::system&quot; is what the sample implementation uses.. but it&#39;s possible you could implement it as a direct library call (easily doable for Clang, for example). And ideally production implementations would use something more robust than std::system ;-)</div><div><br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">-- Rene Rivera<br>-- Grafik - Don&#39;t Assume Anything<br>-- Robot Dreams - <a href="http://robot-dreams.net/" target="_blank">http://robot-dreams.net</a><br><br></div></div></div></div></div>