<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 12, 2017, at 3:03 PM, Jordan Rose via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</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></div></blockquote><div><br class=""></div><div>I agree. It would be worth considering splitting this into two different dimensions: base language standard (90, 94, 99, 11) vs gnu/clang extensions (on/off). GNU extensions are generally compatible with non-extensions, so you may be able to get away with them always being enabled.</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=""><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></div></blockquote><div><br class=""></div><div>Likewise with the above, this could be much simpler.</div></div><br class=""><div class="">-Chris</div><div class=""><br class=""></div></body></html>