<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 29, 2016 at 12:30 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jun 29, 2016 at 12:09 PM, Richard Smith via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi all!<br></div><div><br></div><div>I'd like to establish a policy for Clang's default language standard (if none is specified with -std), as follows:</div><div><br></div><div>  Clang defaults to the most recent published standard for the selected language that it fully implements.</div><div><br></div><div>The practical impact of this is that clang++ will default to C++14 for C++ compilations (for version 3.9 onwards) and will default to C++17 once our implementation support is complete and the standard is published (whichever happens later).</div><div><br></div><div>I'd suggest that we apply the same policy for clang-cl, but if it's important that we enable a not-yet-fully-implemented standard for cl compatibility, that seems reasonable.</div><div><br></div><div>The question of whether the default mode for the GCC-compatible driver should be -std=gnuXXX or -std=cXXX is separate, but also likely worth discussing. Enabling GNU keywords by default is a very odd choice, and if we believe we can change our defaults without breaking the world then this seems like a good time to do so.</div></div></blockquote><div><br></div></span><div><div>Using cXXX instead of gnuXXX would break the world on PS4. So for sure with `-std=c++latest` we would end up proposing a patch to change this for the PS4 target to gnu++latest (or gnu++11 if gnu++latest is not feasible). </div></div></div></div></div></blockquote><div><br></div><div>OK. Out of interest, is it the GNU keywords that you need, or some other effect of the difference between modes?</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 class="gmail_extra"><div class="gmail_quote"><div>(As I'm sure you're aware, we have pending to upstream a patch that makes -std=gnu++11 the default C++ language mode on PS4 (just blocked on fixing tests to not assume the existing std)).</div><div><br></div><div>It may be feasible for us to use a "-std=gnu++latest" behavior and not have to have a PS4-specific default; CC'ing Warren and Paul.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- Sean Silva</div><div> <br></div></font></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class=""><div dir="ltr"><div><br></div><div>I also intend to make explicit in our documentation that our -std=XXX flag enables the selected standard, *plus all relevant issues in Defect Report status from the relevant language committee* (it doesn't make sense to support a language without its bugfixes).</div><div><br></div><div>Thoughts?</div></div>
<br></span><span class="">_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></span></blockquote></div><br></div></div>
</blockquote></div><br></div></div>