<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">A couple more points I skipped earlier...<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 12, 2017, at 3:03 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">[Proposal: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0181-package-manager-cpp-language-version.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0181-package-manager-cpp-language-version.md</a>]<div class=""><br class=""></div><div class="">I don't feel like I have the perspective for broad comments on the use cases for the proposal, but here are some low-level thoughts:</div><div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal; color: rgb(36, 41, 46);" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">public</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">enum</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">CLanguageStandard</span> {
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">c89</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">c90</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">iso9899_1990</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">iso9899_199409</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnu89</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnu90</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">c99</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">iso9899_1999</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnu99</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">c11</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">iso9899_2011</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnu11</span>
}
</pre></div><div class=""><br class=""></div><div class="">I don't think it's worth having every name and every alias here. c89/gnu89, c99/gnu99, and c11/gnu11 covers all of the variants and is what's used most in practice anyway. (IIRC C89 and C90 have some tiny difference from the second standardization, but Clang ignores this difference anyway.)</div><div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.600000381469727px; margin-top: 0px; margin-bottom: 0px; font-stretch: normal; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(246, 248, 250); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal; color: rgb(36, 41, 46);" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">public</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">enum</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(111, 66, 193);">CXXLanguageStandard</span> {
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">cxx98</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">cxx03</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnucxx98</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnucxx03</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">cxx11</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnucxx11</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">cxx14</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnucxx14</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">cxx1z</span>
<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">case</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 92, 197);">gnucxx1z</span>
}</pre><div class=""><br class=""></div></div><div class="">Similar thoughts here. I also wonder if "gnucxx98" is redundant, given that it's already in a containing enum called "CXXLanguageStandard" (or "CPPLanguageStandard", or even "CPlusPlusLanguageStandard", depending on how that discussion goes). "gnu98" seems sufficient.</div><div class=""><br class=""></div><div class="">I really don't like saying "cxx1z". Can we just say "cxx17" because it's <i class="">really</i> likely we'll get it this year?</div></div></div></blockquote><div><br class=""></div>I don't want us to be in the position of making these kinds of decision. I want the one source of truth to rest with the compiler, and we will just reflect what the tools support. So, if you believe this is the right answer I think Clang should accept c++17, and then we will follow along (and deprecate the old API).</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="">If this were a longer-term issue (say, if there were references to "cxx2a") I'd ask what the plan is for aliases in the future. You'd want "cxx2a" and "cxx21" to eventually compare equal, right? But since this will get subsumed by build settings I think it's okay not to worry about that, or any custom standards a vendor or Clang experimenter might try to add.</div></div></div></blockquote><div><br class=""></div>I don't know that I would expect cxx2a and cxx21 to compare equal -- they would be distinct from the perspective of changing what is passed to the compiler. I would imagine if we wanted to support a more semantic notion like this, we would expose a custom API for it.</div><div><br class=""></div><div> - Daniel</div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Jordan</div></div></div></blockquote></div><br class=""></div></body></html>