{"id":458133,"date":"2025-04-29T15:01:54","date_gmt":"2025-04-29T15:01:54","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=458133"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=458133","title":{"rendered":"<span>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 C++26: \u043a\u0430\u043a \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c GCC 15.1 \u0432 Ubuntu<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u044f\u0437\u044b\u043a\u043e\u0432 C \u0438 C++ \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u043d\u043e\u0432\u0438\u043d\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p>\u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u0441\u043b\u0443\u0447\u0430\u044e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e (25 \u0430\u043f\u0440\u0435\u043b\u044f 2025) \u0440\u0435\u043b\u0438\u0437\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC 15.1.0. \u0412 \u043d\u0435\u043c \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0438\u0447\u0438 \u0438\u0437 C++26.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Ubuntu (<code>24.04.2 LTS<\/code>) \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 GCC 13.3.0. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043d\u043e\u0432\u0435\u0435, \u043d\u0443\u0436\u0435\u043d &#171;\u0440\u0443\u0447\u043d\u043e\u0439&#187; \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043d\u0430\u0448 \u043f\u043b\u0430\u043d \u0442\u0430\u043a\u043e\u0432. \u041c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u043e\u0432\u0435\u0439\u0448\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e GCC \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043d\u0430 \u043f\u0440\u043e\u0431\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0421++ \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++26.<\/p>\n<h2>1. \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043e\u0431\u0449\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044f \u043a\u0430\u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 (<code>sudo<\/code>), \u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (<code>apt update<\/code>).<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043e\u043a (<code>&amp;&amp;<\/code>), \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f <code>apt upgrade<\/code>, \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u044f\u0441\u044c (<code>-y<\/code>).<\/p>\n<h2>2. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e GCC<\/h2>\n<p>\u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<pre><code class=\"bash\">sudo g++ --version &amp;&amp; g++ --version<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0421++ \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0438 \u043d\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0434\u0430\u0441\u0442 \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u0430, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 <code>g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0442\u0430\u0440\u0430 \u0434\u043b\u044f \u043d\u0430\u0441, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435&#8230;<\/p>\n<h2>3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h2>\n<pre><code class=\"bash\">sudo apt install -y build-essential git make gawk flex bison libgmp-dev libmpfr-dev libmpc-dev python3 binutils perl libisl-dev libzstd-dev tar gzip bzip2<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u043e\u0432\u0435\u0439\u0448\u0435\u0433\u043e GCC \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 Ubuntu. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, <code>build-essential<\/code>, \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>gcc, g++, make<\/code>.<\/p>\n<pre><code class=\"bash\">export CONFIG_SHELL=\/bin\/bash<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b <code>CONFIG_SHELL<\/code> \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <code>\/bin\/bash<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 GCC, \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0441\u0430\u043c\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 <code>bash<\/code>, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0438\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443.<\/p>\n<h2>4. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u043e\u0432\u0435\u0439\u0448\u0435\u0433\u043e GCC<\/h2>\n<pre><code class=\"bash\">mkdir ~\/gcc-15 cd ~\/gcc-15 git clone https:\/\/gcc.gnu.org\/git\/gcc.git gcc-15-source cd gcc-15-source git checkout releases\/gcc-15.1.0 .\/contrib\/download_prerequisites<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0438 (<code>gcc-15<\/code>, <code>gcc-15-source<\/code>) \u0438 \u0437\u0430\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f (<a href=\"https:\/\/gcc.gnu.org\/git\/gcc.git\" rel=\"noopener noreferrer nofollow\"><code>https:\/\/gcc.gnu.org\/git\/gcc.git<\/code><\/a>) \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 (<code>.\/contrib\/download_prerequisites<\/code>).<\/p>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u0430 \u043a\u043e\u043d\u0435\u0446 \u0430\u043f\u0440\u0435\u043b\u044f 2025 &#8212; \u044d\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f <code>15.1.0<\/code>.<\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>git checkout releases\/gcc-15.1.0<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e \u0441\u0443\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0441\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u044b\u0439\u0434\u0443\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438. \u0421 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0433\u0438\u0442-\u0442\u0435\u0433\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u0432\u0432\u0435\u0434\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>git tag -l<\/code>.<\/p>\n<h2>5. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u0431\u0438\u043b\u0434<\/h2>\n<pre><code class=\"bash\">cd ~\/gcc-15 mkdir gcc-15-build cd gcc-15-build  ..\/gcc-15-source\/configure --prefix=\/opt\/gcc-15 --disable-multilib --enable-languages=c,c++<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>gcc-15<\/code> \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 <code>gcc-15-build<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0438\u043b\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0435.<\/p>\n<p>\u041e\u0442\u0442\u0443\u0434\u0430 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Make-\u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><code>--prefix=\/opt\/gcc-15<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e GCC \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/opt\/gcc-15<\/code>. \u0422\u0430\u043a \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 GCC \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p><code>--disable-multilib<\/code> \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 x64 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d x32 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440). \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0412 <code>--enable-languages=c,c++<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. GCC, \u043a \u0441\u043b\u043e\u0432\u0443, \u043c\u043e\u0436\u0435\u0442 \u0435\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0438\u043d\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438, \u0432\u0440\u043e\u0434\u0435 <code>fortran<\/code>, <code>go<\/code>, <code>d<\/code>&#8230;<\/p>\n<h2>6. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/h2>\n<pre><code class=\"bash\">make -j$(nproc)<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c Make-\u0444\u0430\u0439\u043b\u0435.<\/p>\n<p>\u041e\u043f\u0446\u0438\u044f <code>-j<\/code> (\u043f\u043e\u043b\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 <code>--jobs<\/code>) \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438. \u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0430\u043c\u0430\u044f \u0434\u043e\u043b\u0433\u0430\u044f \u0438 \u0437\u0430\u0439\u043c\u0435\u0442 \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0441\u0430 \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0447\u0430\u0441\u043e\u0432, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u044b.<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 <code>$(nproc)<\/code> \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u0442 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0441\u0431\u043e\u0440\u043a\u0435 GCC. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (<code>make -j8<\/code>) \u0438\u043b\u0438 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 (<code>make -j$(($(nproc) - 1))<\/code>).<\/p>\n<h2>7. \u0418\u043d\u0441\u0442\u0430\u043b\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GCC<\/h2>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>sudo make install<\/code> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 <code>g++ --version<\/code> \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 GCC, \u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043d\u0430\u043b\u0438\u0447\u043d\u044b\u0445 GCC \u043e\u0442\u043d\u044b\u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u043c.<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --install \/usr\/bin\/gcc gcc \/opt\/gcc-15\/bin\/gcc 100 sudo update-alternatives --install \/usr\/bin\/g++ g++ \/opt\/gcc-15\/bin\/g++ 100<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 <code>\/opt\/gcc-15\/bin\/<\/code>.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>g++<\/code> \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 C++ \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u043e ISO \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <code>gcc<\/code> &#8212; \u044d\u0442\u043e C \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 C++ \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 GCC-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>100<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442. \u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u043d\u043e\u0433\u043e.<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --config gcc sudo update-alternatives --config g++<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a <code>g++<\/code> \u0438\u043b\u0438 <code>gcc<\/code>.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>g++ --version<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 &#171;\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439&#187; \u0432\u0435\u0440\u0441\u0438\u0438, \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --install \/usr\/bin\/gcc gcc \/usr\/bin\/gcc-13 50 sudo update-alternatives --install \/usr\/bin\/g++ g++ \/usr\/bin\/g++-13 50<\/code><\/pre>\n<h2>8. \u041d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438<\/h2>\n<p>GCC 15.1 \u043e\u0442\u043a\u0440\u044b\u043b \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0446\u0435\u043b\u043e\u043c\u0443 \u0440\u044f\u0434\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++26. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u0443\u0434\u0443\u0449\u0438\u043c\u0438 \u043d\u043e\u0432\u0430\u0446\u0438\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0442\u0443\u0434\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043c <code>.cpp<\/code> \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"bash\">mkdir gcc_test_folder cd gcc_test_folder touch test26.cpp<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\"> #include &lt;iostream&gt; #include &lt;format&gt;  \/\/ =================================================== \/\/ Feature 1: Pack Indexing \/\/ ===================================================  template&lt;typename... Types&gt; void PrintFirstArg(Types... Args) {     std::cout &lt;&lt; std::format(\"{}\\n\\n\", Args...[0]); }  void TestPackIndexing() {     puts(\"=== Feature 1: Pack Indexing ===\");     PrintFirstArg('a', \"two\", 33); }  \/\/ =================================================== \/\/ Feature 2: Attributes for Structured Bindings \/\/ ===================================================  void TestAttributesForStructuredBindings() {     puts(\"=== Feature 2: Attributes for Structured Bindings ===\");     struct StructS1 { int A = 10, B = 20; } S;     auto [A [[maybe_unused]], B [[deprecated]]] = S;     std::cout &lt;&lt; std::format(\"A = {}, B = {}\\n\\n\", A, B); }  \/\/ =================================================== \/\/ Feature 3: Variadic Friends \/\/ ===================================================  template&lt;typename... Ts&gt; class Passkey {     friend Ts...;     Passkey() { } };  class ClassA; class ClassB;  struct Widget {     void Secret(Passkey&lt;ClassA, ClassB&gt;) const     {         puts(\"Secret accessed!\");     } };  struct ClassA {     void Access(const Widget&amp; W) const { W.Secret({}); } };  struct ClassB {     void Access(const Widget&amp; W) const { W.Secret({}); } };  struct ClassD {     \/\/ Compilation error: ClassD is not a friend     \/\/ void Access(Widget&amp; W) { W.Secret({}); } };  void TestVariadicFriends() {     puts(\"=== Feature 3: Variadic Friends ===\");     Widget W;     ClassA A, B;     A.Access(W);     B.Access(W);     puts(\"\"); }  \/\/ =================================================== \/\/ Feature 4: Constexpr Placement New \/\/ ===================================================  constexpr int ConstexprPlacementNew() {     std::allocator&lt;int&gt; Allocator;     int* P = Allocator.allocate(16);     new (P) int(33);     int Value = *P;     Allocator.deallocate(P, 16);     return Value; }  void TestConstexprPlacementNew() {     puts(\"=== Feature 4: Constexpr Placement New ===\");     constexpr int Result = ConstexprPlacementNew();     std::cout &lt;&lt; std::format(\"Value constructed with placement new: {}\\n\\n\", Result); }  \/\/ =================================================== \/\/ Feature 5: Structured Binding as Condition \/\/ ===================================================  struct StructS2 {     int A, B;     explicit operator bool() const noexcept     {         return A != B;     } };  void Use(int A, int B) {     std::cout &lt;&lt; std::format(\"Using A = {}, B = {}\\n\", A, B); }  void TestStructuredBindingAsCondition() {     puts(\"=== Feature 5: Structured Binding as Condition ===\");     StructS2 S{10, 20};     if (auto [A, B] = S)     {         Use(A, B);     }     puts(\"\"); }  \/\/ =================================================== \/\/ Feature 6: Deleted Function with Reason \/\/ ===================================================  void OldFunction(char*) = delete(\"unsafe, use NewFunction instead\"); void NewFunction(char*) { }  void TestDeletedFunctionWithReason() {     \/\/ error: use of deleted function \u2018void OldFunction(char*)\u2019: unsafe, use NewFunction instead     \/\/ OldFunction(\"test\"); }  \/\/ =================================================== \/\/ Feature 7: Deleting Pointer to Incomplete Type \/\/ ===================================================  struct IncompleteType;  void TestDeletingIncompleteType(IncompleteType* Pointer) {     \/\/ delete Pointer; \/\/ Compilation error in C++26 }  \/\/ =================================================== \/\/ Feature 8: Oxford Variadic Comma \/\/ ===================================================  void DeprecatedFunction(auto......) { } \/\/ omission of \u2018,\u2019 before varargs \u2018...\u2019 is deprecated in C++26 void OkayFunction(auto..., ...) { }  void DeprecatedG(int...) { } \/\/ Deprecated in C++26 void OkayG(int, ...) { }  void DeprecatedH(int X...) { } \/\/ Deprecated in C++26 void OkayH(int X, ...) { }  \/\/ =================================================== \/\/ Main Function \/\/ ===================================================  int main() {     TestPackIndexing();     TestAttributesForStructuredBindings();     TestVariadicFriends();     TestConstexprPlacementNew();     TestStructuredBindingAsCondition();     TestDeletedFunctionWithReason();     TestDeletingIncompleteType(nullptr); }  <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 GCC 15.1.0 \u0444\u0438\u0447\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u0421++26, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0435\u0431\u044b\u0432\u0430\u044f \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0431\u0435\u0437 GNU \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u043d\u043e \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 C++26 (<code>-std=c++2c<\/code> \u0438\u043b\u0438 <code>-std=c++26<\/code>) \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 (<code>.\/test26<\/code>):<\/p>\n<pre><code class=\"bash\">g++ -std=c++26 test26.cpp -o test26 .\/test26<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0434\u0430\u0432 \u043d\u0430\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<h2>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n<ul>\n<li>\n<p><a href=\"https:\/\/gcc.gnu.org\/install\/\" rel=\"noopener noreferrer nofollow\">https:\/\/gcc.gnu.org\/install\/<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/gcc.gnu.org\/projects\/cxx-status.html\" rel=\"noopener noreferrer nofollow\">https:\/\/gcc.gnu.org\/projects\/cxx-status.html<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/C-Dialect-Options.html\" rel=\"noopener noreferrer nofollow\">https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/C-Dialect-Options.html<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/developers.redhat.com\/articles\/2025\/04\/24\/new-c-features-gcc-15#defect_report_resolutions\" rel=\"noopener noreferrer nofollow\">https:\/\/developers.redhat.com\/articles\/2025\/04\/24\/new-c-features-gcc-15<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/905528\/\"> https:\/\/habr.com\/ru\/articles\/905528\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u044b \u044f\u0437\u044b\u043a\u043e\u0432 C \u0438 C++ \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u043d\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u043d\u043e\u0432\u0438\u043d\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0441\u0440\u0430\u0437\u0443.<\/p>\n<p>\u042d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043f\u043e \u0441\u043b\u0443\u0447\u0430\u044e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e (25 \u0430\u043f\u0440\u0435\u043b\u044f 2025) \u0440\u0435\u043b\u0438\u0437\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC 15.1.0. \u0412 \u043d\u0435\u043c \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0438\u0447\u0438 \u0438\u0437 C++26.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Ubuntu (<code>24.04.2 LTS<\/code>) \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0440\u044b\u0439 GCC 13.3.0. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043d\u043e\u0432\u0435\u0435, \u043d\u0443\u0436\u0435\u043d &#171;\u0440\u0443\u0447\u043d\u043e\u0439&#187; \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>\u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0439 \u043d\u0430\u0448 \u043f\u043b\u0430\u043d \u0442\u0430\u043a\u043e\u0432. \u041c\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u043e\u0432\u0435\u0439\u0448\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e GCC \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432, \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438 \u043d\u0430 \u043f\u0440\u043e\u0431\u0443 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0421++ \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++26.<\/p>\n<h2>1. \u041f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u043e\u0431\u0449\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b, \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044f \u043a\u0430\u043a \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 (<code>sudo<\/code>), \u0434\u0430\u0435\u043c \u0437\u043d\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (<code>apt update<\/code>).<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043e\u043a (<code>&amp;&amp;<\/code>), \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f <code>apt upgrade<\/code>, \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0430\u044f\u0441\u044c (<code>-y<\/code>).<\/p>\n<h2>2. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0448\u0443 \u0432\u0435\u0440\u0441\u0438\u044e GCC<\/h2>\n<p>\u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043f\u0440\u0430\u0432\u0434\u0430?<\/p>\n<pre><code class=\"bash\">sudo g++ --version &amp;&amp; g++ --version<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u043c\u044b \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0421++ \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443 \u043d\u0430\u0441 \u043d\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0438 \u043d\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0432\u044b\u0434\u0430\u0441\u0442 \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u043e\u0442\u0432\u0435\u0442\u0430, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 <code>g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u0442\u0430\u0440\u0430 \u0434\u043b\u044f \u043d\u0430\u0441, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435&#8230;<\/p>\n<h2>3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438<\/h2>\n<pre><code class=\"bash\">sudo apt install -y build-essential git make gawk flex bison libgmp-dev libmpfr-dev libmpc-dev python3 binutils perl libisl-dev libzstd-dev tar gzip bzip2<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043d\u043e\u0432\u0435\u0439\u0448\u0435\u0433\u043e GCC \u043d\u0430 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0432 Ubuntu. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, <code>build-essential<\/code>, \u0441\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442 \u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 <code>gcc, g++, make<\/code>.<\/p>\n<pre><code class=\"bash\">export CONFIG_SHELL=\/bin\/bash<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b <code>CONFIG_SHELL<\/code> \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <code>\/bin\/bash<\/code>. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0431\u043e\u0440\u043a\u0435 GCC, \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0441\u0430\u043c\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 <code>bash<\/code>, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0438\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443.<\/p>\n<h2>4. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u043e\u0432\u0435\u0439\u0448\u0435\u0433\u043e GCC<\/h2>\n<pre><code class=\"bash\">mkdir ~\/gcc-15 cd ~\/gcc-15 git clone https:\/\/gcc.gnu.org\/git\/gcc.git gcc-15-source cd gcc-15-source git checkout releases\/gcc-15.1.0 .\/contrib\/download_prerequisites<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0438 (<code>gcc-15<\/code>, <code>gcc-15-source<\/code>) \u0438 \u0437\u0430\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0442\u0443\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f (<a href=\"https:\/\/gcc.gnu.org\/git\/gcc.git\" rel=\"noopener noreferrer nofollow\"><code>https:\/\/gcc.gnu.org\/git\/gcc.git<\/code><\/a>) \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 (<code>.\/contrib\/download_prerequisites<\/code>).<\/p>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0432\u0435\u0440\u0441\u0438\u044e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u0430 \u043a\u043e\u043d\u0435\u0446 \u0430\u043f\u0440\u0435\u043b\u044f 2025 &#8212; \u044d\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f <code>15.1.0<\/code>.<\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>git checkout releases\/gcc-15.1.0<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043f\u043e \u0441\u0443\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0441\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0432\u044b\u0439\u0434\u0443\u0442 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438. \u0421 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0433\u0438\u0442-\u0442\u0435\u0433\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f, \u0432\u0432\u0435\u0434\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>git tag -l<\/code>.<\/p>\n<h2>5. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0438\u0439 \u0431\u0438\u043b\u0434<\/h2>\n<pre><code class=\"bash\">cd ~\/gcc-15 mkdir gcc-15-build cd gcc-15-build  ..\/gcc-15-source\/configure --prefix=\/opt\/gcc-15 --disable-multilib --enable-languages=c,c++<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <code>gcc-15<\/code> \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441\u0431\u043e\u0440\u043a\u0438 <code>gcc-15-build<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0431\u0438\u043b\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0435.<\/p>\n<p>\u041e\u0442\u0442\u0443\u0434\u0430 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Make-\u0444\u0430\u0439\u043b\u0430 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><code>--prefix=\/opt\/gcc-15<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e GCC \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0443 <code>\/opt\/gcc-15<\/code>. \u0422\u0430\u043a \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 GCC \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p><code>--disable-multilib<\/code> \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 x64 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d x32 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440). \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0412 <code>--enable-languages=c,c++<\/code> \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u044f\u0437\u044b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440. GCC, \u043a \u0441\u043b\u043e\u0432\u0443, \u043c\u043e\u0436\u0435\u0442 \u0435\u0449\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0438\u043d\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438, \u0432\u0440\u043e\u0434\u0435 <code>fortran<\/code>, <code>go<\/code>, <code>d<\/code>&#8230;<\/p>\n<h2>6. \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/h2>\n<pre><code class=\"bash\">make -j$(nproc)<\/code><\/pre>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 \u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c Make-\u0444\u0430\u0439\u043b\u0435.<\/p>\n<p>\u041e\u043f\u0446\u0438\u044f <code>-j<\/code> (\u043f\u043e\u043b\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 <code>--jobs<\/code>) \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438. \u0412 \u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0430 \u0441\u0442\u0430\u0434\u0438\u044f \u0441\u0430\u043c\u0430\u044f \u0434\u043e\u043b\u0433\u0430\u044f \u0438 \u0437\u0430\u0439\u043c\u0435\u0442 \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0441\u0430 \u0434\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0447\u0430\u0441\u043e\u0432, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043c\u0430\u0448\u0438\u043d\u044b.<\/p>\n<p>\u041f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 <code>$(nproc)<\/code> \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u0442 \u0438\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u044f\u0434\u0435\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0441\u0431\u043e\u0440\u043a\u0435 GCC. \u041f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e (<code>make -j8<\/code>) \u0438\u043b\u0438 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438 (<code>make -j$(($(nproc) - 1))<\/code>).<\/p>\n<h2>7. \u0418\u043d\u0441\u0442\u0430\u043b\u043b\u0438\u0440\u0443\u0435\u043c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c GCC<\/h2>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>sudo make install<\/code> \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0438\u043d\u0441\u0442\u0430\u043b\u043b\u044f\u0446\u0438\u044e \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<p>\u041c\u0435\u0436\u0434\u0443 \u0442\u0435\u043c, \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 <code>g++ --version<\/code> \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 GCC, \u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u0431\u0443\u0434\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e.<\/p>\n<p>\u041f\u043e\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043a\u0430\u043a\u043e\u0439 \u0438\u0437 \u043d\u0430\u043b\u0438\u0447\u043d\u044b\u0445 GCC \u043e\u0442\u043d\u044b\u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0433\u043b\u0430\u0432\u043d\u044b\u043c.<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --install \/usr\/bin\/gcc gcc \/opt\/gcc-15\/bin\/gcc 100 sudo update-alternatives --install \/usr\/bin\/g++ g++ \/opt\/gcc-15\/bin\/g++ 100<\/code><\/pre>\n<p>\u042d\u0442\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 <code>\/opt\/gcc-15\/bin\/<\/code>.<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e <code>g++<\/code> \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 C++ \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043f\u043e ISO \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <code>gcc<\/code> &#8212; \u044d\u0442\u043e C \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 C++ \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c\u0438 GCC-\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>100<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442. \u0411\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0438 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u043d\u043e\u0433\u043e.<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --config gcc sudo update-alternatives --config g++<\/code><\/pre>\n<p>\u041a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u044d\u0442\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0443\u043c\u0435\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u0432 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a <code>g++<\/code> \u0438\u043b\u0438 <code>gcc<\/code>.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0430 <code>g++ --version<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 GCC, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438.<\/p>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0440\u0435\u0448\u0438\u043c \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 &#171;\u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439&#187; \u0432\u0435\u0440\u0441\u0438\u0438, \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443 \u043d\u0430\u0441 \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0435\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --install \/usr\/bin\/gcc gcc \/usr\/bin\/gcc-13 50 sudo update-alternatives --install \/usr\/bin\/g++ g++ \/usr\/bin\/g++-13 50<\/code><\/pre>\n<h2>8. \u041d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0435\u043c\u0441\u044f \u043d\u043e\u0432\u044b\u043c\u0438 \u0444\u0438\u0447\u0430\u043c\u0438<\/h2>\n<p>GCC 15.1 \u043e\u0442\u043a\u0440\u044b\u043b \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0446\u0435\u043b\u043e\u043c\u0443 \u0440\u044f\u0434\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++26. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0431\u0443\u0434\u0443\u0449\u0438\u043c\u0438 \u043d\u043e\u0432\u0430\u0446\u0438\u044f\u043c\u0438 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0442\u0443\u0434\u0430 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043c <code>.cpp<\/code> \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"bash\">mkdir gcc_test_folder cd gcc_test_folder touch test26.cpp<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0444\u0430\u0439\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\"> #include &lt;iostream&gt; #include &lt;format&gt;  \/\/ =================================================== \/\/ Feature 1: Pack Indexing \/\/ ===================================================  template&lt;typename... Types&gt; void PrintFirstArg(Types... Args) {     std::cout &lt;&lt; std::format(\"{}\\n\\n\", Args...[0]); }  void TestPackIndexing() {     puts(\"=== Feature 1: Pack Indexing ===\");     PrintFirstArg('a', \"two\", 33); }  \/\/ =================================================== \/\/ Feature 2: Attributes for Structured Bindings \/\/ ===================================================  void TestAttributesForStructuredBindings() {     puts(\"=== Feature 2: Attributes for Structured Bindings ===\");     struct StructS1 { int A = 10, B = 20; } S;     auto [A [[maybe_unused]], B [[deprecated]]] = S;     std::cout &lt;&lt; std::format(\"A = {}, B = {}\\n\\n\", A, B); }  \/\/ =================================================== \/\/ Feature 3: Variadic Friends \/\/ ===================================================  template&lt;typename... Ts&gt; class Passkey {     friend Ts...;     Passkey() { } };  class ClassA; class ClassB;  struct Widget {     void Secret(Passkey&lt;ClassA, ClassB&gt;) const     {         puts(\"Secret accessed!\");     } };  struct ClassA {     void Access(const Widget&amp; W) const { W.Secret({}); } };  struct ClassB {     void Access(const Widget&amp; W) const { W.Secret({}); } };  struct ClassD {     \/\/ Compilation error: ClassD is not a friend     \/\/ void Access(Widget&amp; W) { W.Secret({}); } };  void TestVariadicFriends() {     puts(\"=== Feature 3: Variadic Friends ===\");     Widget W;     ClassA A, B;     A.Access(W);     B.Access(W);     puts(\"\"); }  \/\/ =================================================== \/\/ Feature 4: Constexpr Placement New \/\/ ===================================================  constexpr int ConstexprPlacementNew() {     std::allocator&lt;int&gt; Allocator;     int* P = Allocator.allocate(16);     new (P) int(33);     int Value = *P;     Allocator.deallocate(P, 16);     return Value; }  void TestConstexprPlacementNew() {     puts(\"=== Feature 4: Constexpr Placement New ===\");     constexpr int Result = ConstexprPlacementNew();     std::cout &lt;&lt; std::format(\"Value constructed with placement new: {}\\n\\n\", Result); }  \/\/ =================================================== \/\/ Feature 5: Structured Binding as Condition \/\/ ===================================================  struct StructS2 {     int A, B;     explicit operator bool() const noexcept     {         return A != B;     } };  void Use(int A, int B) {     std::cout &lt;&lt; std::format(\"Using A = {}, B = {}\\n\", A, B); }  void TestStructuredBindingAsCondition() {     puts(\"=== Feature 5: Structured Binding as Condition ===\");     StructS2 S{10, 20};     if (auto [A, B] = S)     {         Use(A, B);     }     puts(\"\"); }  \/\/ =================================================== \/\/ Feature 6: Deleted Function with Reason \/\/ ===================================================  void OldFunction(char*) = delete(\"unsafe, use NewFunction instead\"); void NewFunction(char*) { }  void TestDeletedFunctionWithReason() {     \/\/ error: use of deleted function \u2018void OldFunction(char*)\u2019: unsafe, use NewFunction instead     \/\/ OldFunction(\"test\"); }  \/\/ =================================================== \/\/ Feature 7: Deleting Pointer to Incomplete Type \/\/<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-458133","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=458133"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458133\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=458133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=458133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=458133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}