<div dir="ltr"><div dir="ltr">On Wed, 1 Dec 2021 at 12:20, Aaron Ballman via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></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">That said, I'm also happy to see our GCC and Clang requirements<br>
updated if that's reasonable to do so. GCC 5.1 was released April 2015<br>
and Clang 3.5 was released Sept 2014, so these are not particularly<br>
new toolchains.</blockquote><div><br></div><div>In the past, we have used availability in stable OSs as merit for upgrading the minimum.</div><div><br></div><div>On *nix distros, release support usually ~2 years, give or take.</div><div><br></div><div>These are all old releases:</div><div>(Source: <a href="https://pkgs.org/">https://pkgs.org/</a>)<br></div><div><br></div><div>Ubuntu 18.04 has clang 6 and gcc 7.3</div><div>Ubuntu 20.04 has clang 10 and gcc 9.3</div><div>Fedora 33 has clang 11 and gcc 9.2</div><div>Debian Stretch has clang 7 and gcc 6.1</div><div>Centos 8 has clang 12 gcc 8.5</div><div>FreeBSD 12 has clang 11 gcc 6.5 (and 9.3)</div><div>OpenSUSE 15 has clang 9 and gcc 7.5</div><div><br></div><div>Minimum clang and gcc is around  6.x.</div><div><br></div><div>I'm not sure on Mac, but I assume they have a more aggressive goals for the system compiler than many of the Linux/BSD distros and probably have a newer clang than most of them (at the same age).<br></div><div><br></div><div>With clang being the system compiler for Mac and BSD, getting a newer gcc would be just a matter of looking at ports-equivalent.</div><div><br></div><div>On Windows, neither clang nor gcc are the system compiler, so not hard to get the latest version.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Frankly, my biggest driver is the ability to<br>
eventually use C++17 in the code base. I believe the most responsible<br>
way for us to do that is to upgrade compilers before we switch default<br>
language modes so that we're not changing too much at once, which<br>
makes regressions easier to track down and report. However, getting a<br>
newer toolchain by itself is a good end result (we know we're doing<br>
the upgrades at some point and smaller version deltas are often less<br>
risky than larger version deltas).</blockquote><div><br></div><div>+1 to all that.</div><div><br></div><div>Much of C++17 support is in GCC 6, but GCC 7 is a safer bet.</div><div>(Source: <a href="https://gcc.gnu.org/projects/cxx-status.html#cxx17">https://gcc.gnu.org/projects/cxx-status.html#cxx17</a>)</div><div><br></div><div>Clang 5, 6 and 7 have varying degrees of C++17 support, with clang 8 being the last that added something substantial.</div><div>(Source: <a href="https://clang.llvm.org/cxx_status.html#cxx17">https://clang.llvm.org/cxx_status.html#cxx17</a>)</div><div><br></div><div>With that in mind, and the fact that *nix distros have ways to get a newer compiler if needed (ports/PPA), I'd say:</div><div><br></div><div>Clang/GCC 6 is a safe minimum, but Clang/GCC 7 is a better move, if we don't want to change it too soon.</div><div><br></div><div>cheers,</div><div>--renato</div></div></div>