{"id":446604,"date":"2025-01-30T21:09:31","date_gmt":"2025-01-30T21:09:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=446604"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-01-30T21:09:31","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=446604","title":{"rendered":"<span>\u041c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 bool \u0414\u0443\u043c\u0430<\/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>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c, \u0443\u00a0\u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u0430\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u043b\u044e\u0431\u043e\u0432\u044c \u043a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Doom_%281993_video_game%29\">\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 DOOM<\/a>. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u0442\u043e, \u0447\u0442\u043e\u00a0\u0438\u0433\u0440\u0435 \u0443\u0436\u0435 31\u00a0\u0433\u043e\u0434, \u0432\u00a0\u043d\u0435\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u0435\u0441\u0435\u043b\u043e \u0438\u0433\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 (\u0445\u043e\u0442\u044f \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0443\u00a0\u043c\u0435\u043d\u044f \u0442\u0430\u043a \u0441\u0435\u0431\u0435) \u0438\u043b\u0438\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430\u00a0\u0442\u043e, \u043a\u0430\u043a\u00a0\u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u00a0\u043d\u0435\u0435 \u0438\u0433\u0440\u0430\u044e\u0442 (\u0432\u043e\u0442 \u0432\u00a0\u044d\u0442\u043e\u043c \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0441\u0435\u0431\u044f \u043b\u0443\u0447\u0448\u0435); \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440\u044b \u043e\u0442\u043a\u0440\u044b\u0442, \u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u00a0\u2014 \u041f\u041a, \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d, <a href=\"https:\/\/youtu.be\/7gCZZkBATSc\">\u043a\u0430\u043c\u0435\u0440\u0430<\/a>, <a href=\"https:\/\/youtu.be\/xZaKlLyikKg\">\u043e\u0441\u0446\u0438\u043b\u043b\u043e\u0441\u043a\u043e\u043f<\/a>\u00a0\u2014 \u0434\u0430\u00a0\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0434\u0435\u0442 \u0432\u0430\u043c \u0432\u00a0\u0433\u043e\u043b\u043e\u0432\u0443. \u0412\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u044f\u0434\u0443 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u0435\u0438\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0DOOM \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432\u00a0Fedora Linux.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0437\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0434\u043e\u00a0\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430, \u043f\u0440\u043e\u0435\u043a\u0442 Fedora Linux \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0441\u0435\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u00a0\u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u00a0\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 ABI, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u00a0\u043b\u0438\u043d\u043a\u0443\u0435\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041a\u0430\u043a\u00a0\u0431\u044b \u0442\u043e \u043d\u0438\u00a0\u0431\u044b\u043b\u043e, \u0441\u00a0\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0430 Fedora Linux 42\u00a0\u0432\u00a0\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u0430\u043f\u0440\u0435\u043b\u044f, \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f\u00a0\u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438, \u0438 \u043a\u0430\u043a\u00a0\u0447\u0430\u0441\u0442\u043e\u00a0\u0431\u044b\u0432\u0430\u0435\u0442, \u043d\u0435\u00a0\u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432\u044b\u0436\u0438\u043b\u0438. \u041e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u00a0\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f <code>chocolate-doom<\/code>.<\/p>\n<h2>\u0414\u0432\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0434\u044b \u043f\u0440\u0430\u0432\u0434\u0443 \u043d\u0435 \u0434\u0430\u044e\u0442<\/h2>\n<p>\u041b\u0430\u0434\u043d\u0435\u043d\u044c\u043a\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code class=\"bash\">gcc -DHAVE_CONFIG_H -I. -I..\/..    -I..\/..\/src -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -O2 -g -Wall -Wdeclaration-after-statement -Wredundant-decls -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1 -fstack-protector-strong -specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT  -I\/usr\/include\/libpng16 -DWITH_GZFILEOP -I\/usr\/include\/pipewire-0.3 -I\/usr\/include\/spa-0.2 -D_REENTRANT -I\/usr\/lib64\/pkgconfig\/..\/..\/include\/dbus-1.0 -I\/usr\/lib64\/pkgconfig\/..\/..\/lib64\/dbus-1.0\/include -I\/usr\/include\/libinstpatch-2 -I\/usr\/include\/glib-2.0 -I\/usr\/lib64\/glib-2.0\/include -I\/usr\/include\/sysprof-6 -pthread -I\/usr\/include\/opus -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -c -o deh_bexstr.o deh_bexstr.c In file included from ..\/..\/src\/sha1.h:21,                  from ..\/..\/src\/deh_defs.h:21,                  from deh_bexstr.c:22: ..\/..\/src\/doomtype.h:113:5: error: cannot use keyword \u2018false\u2019 as enumeration constant   113 |     false,       |     ^~~~~ ..\/..\/src\/doomtype.h:113:5: note: \u2018false\u2019 is a keyword with \u2018-std=c23\u2019 onwards<\/code><\/pre>\n<p>\u0410\u0433\u0430, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\u00a0\u0431\u044b\u043b\u0430 \u043d\u0430\u00a0\u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0433\u0438\u0445 \u043b\u0435\u0442 \u043e\u0431\u0432\u0438\u043d\u0435\u043d\u0438\u0439 \u0432\u00a0\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u043e\u0431\u00a0\u043e\u0448\u0438\u0431\u043a\u0435, GCC \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438,\u00a0\u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u00a0\u0447\u0435\u043c \u0434\u0435\u043b\u043e. \u0412\u00a0\u043a\u043e\u0434\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 chocolate\u2011doom \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f boolean:<\/p>\n<pre><code class=\"cpp\">#if defined(__cplusplus) || defined(__bool_true_false_are_defined)   typedef bool boolean;   #else   typedef enum  {     false,      true } boolean; #endif<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u00a0C++, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0438\u043f <code>bool<\/code> \u0438\u0437\u00a0C++, \u0430\u00a0\u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u00a0C\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0438\u043f. \u042d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438 C, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u00a0C89\u00a0\u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u0442\u0438\u043f\u0430 boolean \u043a\u0430\u043a\u00a0\u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e, \u0430\u00a0\u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u00a0C99\u00a0\u0442\u0438\u043f \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f <code>_Bool<\/code>\u00a0\u2014 \u0445\u043e\u0442\u044f\u00a0\u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>&lt;stdbool.h&gt;<\/code>, \u0434\u043b\u044f\u00a0\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0432\u0448\u0438\u0439 \u043c\u0430\u043a\u0440\u043e\u0441\u044b <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0C23, <code>_Bool<\/code> \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d \u0432 <code>bool<\/code>, \u0430\u00a0\u0442\u0440\u043e\u0438\u0446\u0430 <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<p>\u041e\u043a\u0435\u0439, \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0447\u0442\u043e\u00a0\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0438\u043f boolean \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <code>false<\/code> \u0438 <code>true<\/code>\u00a0\u2014 \u043d\u043e\u00a0\u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e? \u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0430 \u0438\u0434\u0435\u0442 \u0441\u00a0C23?<\/p>\n<h2>\u0412\u043f\u043e\u043b\u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435  <\/h2>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u043e\u0432 \u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0430\u0434, \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u0446\u0435\u043b\u0435\u0439 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438\u00a0\u2014 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u0434\u0438\u0441\u0442\u0438\u0431\u0443\u0442\u0438\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/gcc.gnu.org\/releases.html\">\u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0432\u0435\u0440\u0441\u0438\u0439 GCC<\/a>, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u00a0\u043d\u0430\u00a0\u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10\u00a0\u043b\u0435\u0442 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0436\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0432\u00a0\u0433\u043e\u0434 \u0433\u0434\u0435\u2011\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0430\u043f\u0440\u0435\u043b\u0435\u043c \u0438 \u043c\u0430\u0435\u043c, \u0447\u0442\u043e\u00a0\u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432 Fedora Linux, \u0434\u0435\u043b\u0430\u044f \u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u043e\u0439 \u0434\u043b\u044f\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u2011\u0440\u0435\u043b\u0438\u0437\u043e\u0432 GCC \u043d\u0430\u00a0\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0435\u00a0\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u00a0\u2014 <a href=\"https:\/\/koji.fedoraproject.org\/koji\/buildinfo?buildID=2615313\">GCC 15.0.1<\/a> \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u00a0Fedora Rawhide (\u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u0432\u0435\u0447\u043d\u043e\u0439 \u0430\u043b\u044c\u0444\u044b\u00bb \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438) \u0437\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0434\u043e\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438. \u0412 <a href=\"https:\/\/gcc.gnu.org\/gcc-15\/porting_to.html\">\u0447\u0435\u043d\u0434\u0436\u043b\u043e\u0433\u0435 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0435\u0441\u044f \u043a\u00a0\u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435\u00a0\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00a0\u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0441 <code>-std=gnu17<\/code> \u043d\u0430 <code>-std=gnu23<\/code>. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043d\u0435\u0439 \u043d\u0435\u0442 \u043e\u043f\u0446\u0438\u0438 <code>-std=<\/code>, \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u00a0\u0442\u0435\u043f\u0435\u0440\u044c? \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0432, \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a\u00a0\u0442\u0440\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u042f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C, \u0443\u043a\u0430\u0437\u0430\u0432 C17\u00a0\u0438\u043b\u0438\u00a0\u0441\u0442\u0430\u0440\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0441\u00a0\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c <code>boolean<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 <code>#ifdef<\/code> \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f <code>bool<\/code> \u043f\u0440\u0438\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 C23.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b <code>enum<\/code> \u0432 <code>False<\/code> \u0438 <code>True<\/code> \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e\u00a0\u043f\u043e\u00a0\u0441\u0443\u0442\u0438\u00a0\u2014 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u043f\u043e\u0442\u043e\u043c, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0432\u00a0\u0446\u0435\u043b\u043e\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439. \u0422\u0440\u0435\u0442\u044c\u044f \u043e\u043f\u0446\u0438\u044f\u00a0\u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f, \u043d\u043e\u00a0\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043c\u0443\u0442\u043e\u0440\u043d\u0430\u044f. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0432, \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<pre><code class=\"cpp\">--- a\/src\/doomtype.h +++ b\/src\/doomtype.h @@ -100,9 +100,9 @@    #include &lt;inttypes.h&gt;   -#if defined(__cplusplus) || defined(__bool_true_false_are_defined) +#if defined(__cplusplus) || defined(__bool_true_false_are_defined) || (__STDC_VERSION__ &gt;= 202311L)   -\/\/ Use builtin bool type with C++. +\/\/ Use builtin bool type with C++ and C23.    typedef bool boolean;<\/code><\/pre>\n<p>\u041f\u0430\u0442\u0447 \u0431\u044b\u043b \u043d\u0435\u0441\u043b\u043e\u0436\u0435\u043d \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f Fedora \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043b\u0435\u0433\u043a\u0438\u043c \u0444\u0438\u043a\u0441\u043e\u043c, \u044f \u043e\u0442\u043a\u0440\u044b\u043b <a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/pull\/1722\">pull request \u0432 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0435<\/a>.  <\/p>\n<h2>\u0414\u0432\u0438\u0436\u043e\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0443\u043c  <\/h2>\n<p>\u041c\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0438 \u043c\u0435\u0438\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u00a0\u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e\u00a0\u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u00a0C99. \u041e\u0434\u0438\u043d \u0438\u0437\u00a0\u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/pull\/1723\">\u0435\u0449\u0435 \u043e\u0434\u0438\u043d pull request<\/a>: <\/p>\n<pre><code class=\"cpp\">--- a\/src\/doomtype.h +++ b\/src\/doomtype.h @@ -99,12 +99,11 @@  \/\/ standard and defined to include stdint.h, so include this.     #include &lt;inttypes.h&gt; +#include &lt;stdbool.h&gt;    #if defined(__cplusplus) || defined(__bool_true_false_are_defined)   -\/\/ Use builtin bool type with C++. - -typedef bool boolean; +typedef int boolean;    #else<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <code>#include<\/code> \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f C99, <code>&lt;stdbool.h&gt;<\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code>. \u041d\u043e\u00a0\u0432\u043e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 <code>typedef<\/code>\u00a0\u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u00a0\u2014 \u043e\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e, \u0447\u0442\u043e\u00a0\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a\u00a0C99, \u043a\u043e\u0434 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u0443\u043b\u0435\u0432\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u00a0\u0432\u0438\u0434\u0435 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 <code>bool<\/code>\/<code>_Bool<\/code>. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438:<\/p>\n<blockquote>\n<p><strong><em>&lt;turol&gt;<\/em><\/strong><em><br \/>Explicitly setting the C standard is fine but we shouldn&#8217;t change the includes or boolean type.<\/em><\/p>\n<p><strong><em>&lt;fabiangreffrath&gt;<\/em><\/strong><em><br \/>Chocolate Doom doesn&#8217;t even start if we keep\u00a0<\/em><code>#typedef bool boolean<\/code>.<\/p>\n<p><strong><em>&lt;suve&gt;<\/em><\/strong><em><br \/>What do you mean by &#171;doesn&#8217;t even start&#187;? Crashes right away? Including\u00a0<\/em><code>&lt;stdbool.h&gt;<\/code>\u00a0adds the\u00a0<code>#define bool _Bool<\/code>\u00a0macro, so keeping\u00a0<code>typedef bool boolean<\/code>\u00a0means you&#8217;re using the C99\u00a0<code>_Bool<\/code>\u00a0type.<\/p>\n<p><strong><em>&lt;fabiangreffrath&gt;<\/em><\/strong><em><br \/>It fails with:\u00a0<\/em><code>R_InitSprites: Sprite TROO frame I has rotations and a rot=0 lump<\/code>.<\/p>\n<\/blockquote>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>_Bool<\/code> \u0434\u043b\u044f\u00a0\u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0431\u0440\u0435\u043a\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u043e\u043a \u043d\u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c. \u0418\u0437\u00a0\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u00a0<a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/blob\/chocolate-doom-3.1.0\/src\/doom\/r_things.c#L136\">\u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430<\/a> \u043e\u043d\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442: <\/p>\n<pre><code class=\"cpp\">if (sprtemp[frame].rotate == false)     I_Error (\"R_InitSprites: Sprite %s frame %c has rotations \"          \"and a rot=0 lump\", spritename, 'A'+frame);<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e\u00a0\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u042f \u043d\u0435\u00a0\u0431\u0443\u0434\u0443 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0436\u0443:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>R_InstallSpriteLump()<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>frame<\/code>\u00a0\u2014 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418 \u0445\u043e\u0442\u044c \u043e\u043d \u0438 \u043d\u0435\u00a0\u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <code>const<\/code>, \u043e\u043d \u043d\u0435\u00a0\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><code>sprtemp<\/code>\u00a0\u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 29\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <code>spriteframe_t<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0435 <code>.rotate<\/code> \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>boolean<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f: \u043a\u043e\u0433\u0434\u0430 boolean\u00a0\u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 enum\u2011\u0442\u0438\u043f, \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u00a0\u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>false<\/code>; \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>_Bool<\/code> \u043e\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>true<\/code> \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a\u00a0\u0432\u044b\u0445\u043e\u0434\u0443 \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0417\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u2026 \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>gdb<\/code>. \u041d\u0430\u0447\u043d\u0435\u043c \u0441\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<pre><code class=\"bash\">$ gdb .\/build\/src\/chocolate-doom--enum [...] (gdb) break src\/doom\/r_things.c:138 Breakpoint 1 at 0x44f822: file chocolate-doom\/src\/doom\/r_things.c, line 138. (gdb) run [...] Thread 1 \"chocolate-doom\" hit Breakpoint 1, R_InstallSpriteLump (lump=1242, frame=0, rotation=1, flipped=false) at chocolate-doom\/src\/doom\/r_things.c:138 138     if (sprtemp[frame].rotate == false) (gdb) print sprtemp[frame] $1 = {rotate = (true | unknown: 0xfffffffe), lump = {-1, -1, -1, -1, -1, -1, -1, -1}, flip = \"\\377\\377\\377\\377\\377\\377\\377\\377\"} (gdb) step 142     sprtemp[frame].rotate = true;<\/code><\/pre>\n<p>\u041e\u043a\u0435\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e <code>boolean<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u2026 \u044d\u043c, \u0447\u0435\u0433\u043e? \u041d\u043e\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u043b\u0430, \u043d\u043e\u00a0\u043f\u043e\u0445\u043e\u0436\u0435 \u0447\u0442\u043e\u00a0\u0438\u0437\u2011\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u0442\u0438\u043f <code>boolean<\/code>\u00a0\u2014 <code>enum<\/code>, <code>gdb<\/code> \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u043e\u0447\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u0432 \u043a\u0430\u043a\u00a0\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418\u00a0\u0441\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <code>enum<\/code>. (\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u043d\u0435\u00a0\u043e\u0441\u043e\u0431\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.) \u041a\u0430\u043a\u00a0\u0431\u044b \u0442\u043e \u043d\u0438\u00a0\u0431\u044b\u043b\u043e, <code>true<\/code> \u044d\u0442\u043e <code>1<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e \u0418\u041b\u0418\u00a0\u0441 \u00ab\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u00bb \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>0xffffffff<\/code>, \u0447\u0442\u043e\u00a0\u0442\u043e\u043b\u043a\u0430\u0435\u0442 \u043d\u0430\u00a0\u043c\u044b\u0441\u043b\u044c \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0438 <code>-1<\/code> \u043d\u0430\u00a0\u043e\u0434\u043d\u043e\u043c \u0438\u0437\u00a0\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432. \u0422\u0430\u043a \u0438 \u0435\u0441\u0442\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0431\u044d\u043a\u0442\u0440\u0435\u0439\u0441 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043c\u044b \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u044b\u0437\u043e\u0432 <code>memset (sprtemp,-1, sizeof(sprtemp));<\/code>.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043a\u0430\u043a\u00a0\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439 \u043c\u0435\u043d\u044c\u0448\u0435. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a\u00a0\u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442\u0443, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>0xffffffff<\/code> \u0438 <code>0x0<\/code>, \u0447\u0442\u043e\u00a0\u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>false<\/code>. \u041b\u043e\u0433\u0438\u0447\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0432\u0435\u0440\u0441\u0438\u044e <code>_Bool<\/code>.<\/p>\n<pre><code class=\"bash\">$ gdb .\/build\/src\/chocolate-doom--bool [...] (gdb) break src\/doom\/r_things.c:138 Breakpoint 1 at 0x44f822: file chocolate-doom\/src\/doom\/r_things.c, line 138. (gdb) run [...] Thread 1 \"chocolate-doom\" hit Breakpoint 1, R_InstallSpriteLump (lump=1242, frame=0, rotation=1, flipped=false) at chocolate-doom\/src\/doom\/r_things.c:138 138     if (sprtemp[frame].rotate == false) (gdb) print sprtemp[frame] $1 = {rotate = 255, lump = {-1, -1, -1, -1, -1, -1, -1, -1}, flip = \"\\377\\377\\377\\377\\377\\377\\377\\377\"}<\/code><\/pre>\n<p>\u0420\u0430\u0437\u043c\u0435\u0440 <code>boolean<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u043d\u044c\u0448\u0435\u00a0\u2014 1\u00a0\u0431\u0430\u0439\u0442 \u0432\u043c\u0435\u0441\u0442\u043e 4. \u041d\u0435\u00a0\u0441\u0447\u0438\u0442\u0430\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f, \u0432\u0441\u0435 \u0442\u0430\u043a\u00a0\u0436\u0435, \u043a\u0430\u043a\u00a0\u0438 \u0440\u0430\u043d\u044c\u0448\u0435\u00a0\u2014 \u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>-1<\/code> \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 <code>255 == 0<\/code>. <\/p>\n<pre><code class=\"cpp\">(gdb) step 139     I_Error (\"R_InitSprites: Sprite %s frame %c has rotations \"<\/code><\/pre>\n<p>\u042d\u043c\u2026\u0422\u043e \u0435\u0441\u0442\u044c\u2026 \u0447 \u0435 \u0433 \u043e? <\/p>\n<h2>\u0412\u0440\u0435\u043c\u044f \u043a\u043e\u043f\u043d\u0443\u0442\u044c \u0433\u043b\u0443\u0431\u0436\u0435  <\/h2>\n<p>\u0414\u0430\u0430, \u044d\u0442\u043e\u00a0\u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e. \u041f\u043e\u0434\u0443\u043c\u0430\u0432, \u0447\u0442\u043e\u00a0\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0435\u2011\u0442\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u00a0\u0434\u0440\u0443\u0433\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435\u00a0\u0432\u0438\u0436\u0443, \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0\u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f. <\/p>\n<pre><code class=\"cpp\">#include &lt;stdio.h&gt; #include &lt;string.h&gt;   #ifdef DUPA #include &lt;stdbool.h&gt; typedef bool boolean; #else typedef enum {     false,     true } boolean; #endif   boolean some_var[30];   int main(void) {     memset(some_var, -1, sizeof(some_var));     some_var[0] = false;     some_var[1] = 500;       for(int i = 0; i &lt;= 2; ++i) {         if(some_var[i] == false) printf(\"some_var[%d] is false\\n\", i);         if(some_var[i] == true) printf(\"some_var[%d] is true\\n\", i);         printf(\"value of some_var[%d] is %d\\n\", i, some_var[i]);     }     return 0; }<\/code><\/pre>\n<p>\u0418 \u0434\u0430, \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u043e \u0441\u00a0\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c \u0432\u00a0\u0438\u0433\u0440\u0435: <\/p>\n<pre><code class=\"bash\">$ gcc -o booltest .\/booltest.c  $ .\/booltest  some_var[0] is false value of some_var[0] is 0 some_var[1] is true value of some_var[1] is 1 value of some_var[2] is -1 $ gcc -DDUPA -o booltest .\/booltest.c  $ .\/booltest  some_var[0] is false value of some_var[0] is 0 some_var[1] is true value of some_var[1] is 1 some_var[2] is false some_var[2] is true value of some_var[2] is 255<\/code><\/pre>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443\u2011\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>_Bool<\/code> \u0440\u0430\u0432\u043d\u043e\u0433\u043e <code>255<\/code> \u0434\u0435\u043b\u0430\u043b\u043e \u0442\u0430\u043a, \u0447\u0442\u043e\u00a0\u043e\u043d\u043e\u00a0\u0431\u044b\u043b\u043e <code>true<\/code> \u0438 <code>false<\/code> \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e. \u041e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430\u00a0\u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u00a0C\u2011\u043a\u043e\u0434\u0435\u00a0\u0431\u044b\u043b\u043e \u043d\u0435\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0430\u00a0\u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0432\u00a0\u0442\u043e\u043c, \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u00a0\u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430. \u0414\u043b\u044f\u00a0\u044d\u0442\u043e\u0433\u043e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b<a href=\"https:\/\/godbolt.org\/z\/vrYbajEc9\"> <u>Godbolt compiler explorer<\/u><\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5e\/41a\/11e\/c5e41a11e5a7be0750f1555fb5bfc68b.png\" width=\"1400\" height=\"700\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c5e\/41a\/11e\/c5e41a11e5a7be0750f1555fb5bfc68b.png\"\/><\/figure>\n<p>\u0410\u0433\u0430! \u0421\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u043b\u0438\u0441\u044c. \u042d\u0442\u043e\u00a0\u0431\u044b\u043b\u043e\u00a0\u0431\u044b \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043d\u043e\u0432\u043e\u0441\u0442\u044c\u044e, \u0435\u0441\u043b\u0438\u00a0\u0431\u044b \u044f \u043d\u0435\u00a0\u0443\u043f\u0443\u0441\u0442\u0438\u043b \u043e\u0434\u043d\u0443 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u044c: <em>\u044f \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u00a0\u0437\u043d\u0430\u044e \u043e\u00a0x86-\u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435<\/em>.<\/p>\n<p>\u041a\u00a0\u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0443\u00a0\u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u043a\u0430\u043a\u00a0\u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430\u00a0\u043c\u043d\u043e\u0433\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b\u00a0\u0431\u044b\u0442\u0438\u044f. \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u044f \u043d\u0430\u0447\u0430\u043b \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u043d\u0430\u00a0\u043f\u043e\u043b\u044c\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a (\u043d\u043e \u0434\u043b\u044f\u00a0\u0432\u0430\u0448\u0435\u0433\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0442\u0443\u0442 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u00a0\u0440\u0443\u0441\u0441\u043a\u043e\u043c). \u0412\u043e\u00a0\u0432\u0441\u0435\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u043a\u043e\u0434 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u00a0\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 <code>some_value[i]<\/code> \u0432\u00a0\u0440\u0435\u0433\u0438\u0441\u0442\u0440 <code>eax<\/code>.<\/p>\n<h3>boolean &#8212; enum, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 true  <\/h3>\n<ol>\n<li>\n<p><code>CMP eax, 1<br \/><\/code>\u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u00a0\u2014 \u0438\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441 1. \u0415\u0441\u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0440\u0430\u0432\u043d\u044b, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u00ab\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0444\u043b\u0430\u0433\u00bb (ZF); \u0432\u00a0\u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u043b\u0430\u0433 \u043e\u0431\u043d\u0443\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><code>JNE .L4<\/code><br \/>\u0418\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 ZF \u0438 \u0435\u0441\u043b\u0438 \u043e\u043d \u043d\u0435\u00a0\u0437\u0430\u0434\u0430\u043d, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u044b\u0436\u043e\u043a, \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044f \u0432\u044b\u0437\u043e\u0432 <code>printf()<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u043a\u0435\u0439, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435\u00a0\u2014 \u0432\u043c\u0435\u0441\u0442\u043e \u00ab\u0441\u0434\u0435\u043b\u0430\u0439 \u0447\u0442\u043e\u2011\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0432\u043d\u0430 1\u00bb \u044f \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438 \u0448\u0442\u0443\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435\u00a0\u0440\u0430\u0432\u043d\u0430 1\u00bb\u00a0\u2014 \u043d\u043e\u00a0\u0432\u00a0\u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u0412\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u0434 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u00a0\u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c.<\/p>\n<h3>boolean &#8212; enum, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 false  <\/h3>\n<ol>\n<li>\n<p><code>TEST eax, eax<\/code><br \/>\u0422\u0443\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0441\u00a0\u0441\u0430\u043c\u0438\u043c \u0441\u043e\u0431\u043e\u0439. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e 0, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f ZF, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442\u00a0\u2014 \u0444\u043b\u0430\u0433 \u0441\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><code>JNE .L3<\/code><br \/> \u0415\u0441\u043b\u0438 ZF \u043d\u0435\u00a0\u0437\u0430\u0434\u0430\u043d, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u044b\u0436\u043e\u043a \u0438 \u0432\u044b\u0437\u043e\u0432 <code>printf()<\/code> \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u00a0\u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043a\u043e\u0434 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u0435\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u00ab\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 0\u00bb \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u00ab\u0432\u044b\u043f\u043e\u043b\u043d\u0438 \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f\u00bb\u00a0\u2014 \u0447\u0442\u043e\u00a0\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u043a\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f. \u0422\u0435\u043c \u043d\u0435\u00a0\u043c\u0435\u043d\u0435\u0435, \u043a\u043e\u0434 \u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0442\u043e\u00a0\u0434\u043e\u043b\u0436\u0435\u043d\u00a0\u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u044b\u0437\u043e\u0432 <code>printf()<\/code> \u0434\u043b\u044f\u00a0\u043b\u044e\u0431\u043e\u0433\u043e \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h3>boolean &#8212; _Bool, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 true<\/h3>\n<ol>\n<li>\n<p><code>TEST al, al<\/code><br \/>\u0422\u0443\u0442 \u043e\u043f\u044f\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u0435\u0431\u044f \u0438 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f ZF \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0432\u0435\u043d 0. <code>al<\/code> \u044d\u0442\u043e \u0432\u043e\u0441\u044c\u043c\u0438\u0431\u0438\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 8\u00a0\u043d\u0438\u0436\u043d\u0438\u043c \u0431\u0438\u0442\u0430\u043c <code>eax<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <code>boolean<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 1\u00a0\u0431\u0430\u0439\u0442 \u0432\u043c\u0435\u0441\u0442\u043e 4.<\/p>\n<\/li>\n<li>\n<p><code>JE .L4<\/code><br \/>\u041f\u0440\u044b\u0436\u043e\u043a, \u0435\u0441\u043b\u0438 ZF \u0437\u0430\u0434\u0430\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0442 \u0442\u0443\u0442 \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435! \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e\u00a0\u0432\u00a0\u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435\u00a0\u0440\u0430\u0432\u043d\u0430 1\u00bb, \u0430 \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e 0\u00bb.<\/p>\n<h3>boolean &#8212; _Bool, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 false<\/h3>\n<ol>\n<li>\n<p><code>XOR eax, 1<\/code><br \/>\u0417\u0434\u0435\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u0418\u041b\u0418\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438 1. \u041f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u041f\u043e\u00a0\u0441\u0443\u0442\u0438, \u044d\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0431\u0438\u0442\u0430 \u0431\u0443\u043b\u0435\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u00a0\u2014 \u0441 0\u00a0\u043d\u0430 1\u00a0\u0438\u043b\u0438\u00a0\u0441 1\u00a0\u043d\u0430 0.<\/p>\n<\/li>\n<li>\n<p><code>TEST al, al<\/code><br \/>\u041e\u043f\u044f\u0442\u044c\u00a0\u0436\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418\u00a0\u0438 \u0435\u0441\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0432\u0435\u043d 0, \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f ZF.<\/p>\n<\/li>\n<li>\n<p><code>JE .L3<\/code><br \/>\u041f\u0440\u044b\u0436\u043e\u043a, \u0435\u0441\u043b\u0438 ZF \u0437\u0430\u0434\u0430\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0442 \u043e\u043d\u043e \u0447\u0442\u043e. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u043d \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0438\u0436\u043d\u0438\u0439 \u0431\u0438\u0442 \u0438 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0440\u044b\u0436\u043e\u043a, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0432\u043d\u043e 0. \u0410\u00a0\u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u00ab\u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0432\u043d\u0430 1\u00bb.<\/p>\n<h3>\u041f\u043e\u0434\u0432\u043e\u0434\u044f \u0438\u0442\u043e\u0433<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 <code>boolean<\/code> \u044d\u0442\u043e <code>enum<\/code>, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e, \u0447\u0442\u043e\u00a0\u044f \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u00a0\u2014 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>== false<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0440\u0430\u0432\u043d\u043e\u00a0\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0, \u0430 <code>== true<\/code> \u0432\u00a0\u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u00a0\u2014 \u0440\u0430\u0432\u043d\u043e\u00a0\u043b\u0438 \u043e\u043d\u043e 1.<\/p>\n<p>\u041d\u043e\u00a0\u043a\u043e\u0433\u0434\u0430 <code>boolean<\/code> \u044d\u0442\u043e <code>_Bool<\/code>, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <code>== false<\/code> \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 <code>!= 1<\/code>, \u0430 <code>== true<\/code> \u0432 <code>!= 0<\/code>, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u041d\u043e\u00a0\u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0437\u0430\u0431\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 255\u00a0\u2014 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 255\u00a0\u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0435 1\u00a0\u0438 \u043d\u0435 0, \u043e\u0431\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442!<\/p>\n<h2>\u0410 \u0443 \u043d\u0438\u0445 \u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430?  <\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u043d\u0430\u0435\u043c, <em>\u0447\u0442\u043e<\/em> \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u0433\u0430\u0434\u043a\u0430 &#8212; \u0443\u0437\u043d\u0430\u0442\u044c, <em>\u043f\u043e\u0447\u0435\u043c\u0443<\/em> \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442. \u041d\u0443 \u0442\u043e \u0435\u0441\u0442\u044c, \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0439, \u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u043e C, \u044f \u0431\u044b\u043b \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0432\u0441\u0435\u043c\u0438 \u043b\u044e\u0431\u0438\u043c\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 \u044f\u0437\u044b\u043a\u0430 &#8212; \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0441 UBSan \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u0443\u044e \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u0443.<\/p>\n<pre><code class=\"bash\">$ gcc -DDUPA -fsanitize=undefined -o booltest .\/booltest.c  $ .\/booltest  some_var[0] is false value of some_var[0] is 0 some_var[1] is true value of some_var[1] is 1 booltest.c:22:14: runtime error: load of value 255, which is not a valid value for type '_Bool' booltest.c:23:14: runtime error: load of value 255, which is not a valid value for type '_Bool' some_var[2] is true booltest.c:24:69: runtime error: load of value 255, which is not a valid value for type '_Bool' value of some_var[2] is 1<\/code><\/pre>\n<p>\u041d\u0430\u00a0\u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e\u00a0\u0431\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c, \u043d\u043e\u00a0\u043c\u043d\u0435 \u0432\u0441\u0435\u00a0\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043a\u0430\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u0432\u044b\u0448\u0435. \u042f \u043d\u0430\u0448\u0435\u043b PDF\u2011\u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C99\u00a0\u0438 \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0442\u044c\u0441\u044f \u0433\u043b\u0430\u0437\u0430\u043c\u0438. \u041a\u00a0\u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u00a0\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 J \u00abPortability issues\u00bb, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441\u00a0\u043d\u0435\u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c, \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u0438\u043b\u0438\u00a0\u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u043c \u043e\u0442\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u043d\u0435\u00a0\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0441\u0447\u0435\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <code>_Bool<\/code>.<\/p>\n<p>\u0415\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043f\u0430\u0432\u0448\u0438\u0441\u044c, \u044f \u043d\u0430\u0448\u0435\u043b \u043e\u0442\u0432\u0435\u0442 \u0432\u00a0\u0440\u0430\u0437\u0434\u0435\u043b\u0435 6.2.6, \u00abRepresentation of types\u00bb. \u041f\u0430\u0440\u0430\u0433\u0440\u0430\u0444 6.2.6.1.5\u00a0\u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<blockquote>\n<p><em>Certain object representations need not represent a value of the object type. If the stored value of an object has such a representation and is read by an lvalue expression that does not have character type, the behavior is unde\ufb01ned.<\/em>  <\/p>\n<\/blockquote>\n<p>\u042d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043c\u043e\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e &#8212; \u0431\u044b\u043b \u043e\u0431\u044a\u0435\u043a\u0442 <code>_Bool<\/code> \u0441 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>_Bool<\/code> \u0438 \u043e\u043d \u0447\u0438\u0442\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0435\u0433\u043e \u043a\u0430\u043a <code>char<\/code>. \u0422\u0430\u043a \u0447\u0442\u043e \u0434\u0430, \u043a\u043e\u0434 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 \u0437\u043e\u043d\u0443 UB; \u043d\u0430 \u0441\u0447\u0430\u0441\u0442\u044c\u0435 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0434\u0435\u043c\u043e\u043d\u044b \u043c\u0435\u043d\u044f \u043f\u043e\u0449\u0430\u0434\u0438\u043b\u0438.  <\/p>\n<\/p>\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\/877984\/\"> https:\/\/habr.com\/ru\/articles\/877984\/<\/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>\u0414\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u044c, \u0443\u00a0\u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u0430\u044f \u043e\u0441\u043e\u0431\u0430\u044f \u043b\u044e\u0431\u043e\u0432\u044c \u043a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Doom_%281993_video_game%29\">\u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 DOOM<\/a>. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u0442\u043e, \u0447\u0442\u043e\u00a0\u0438\u0433\u0440\u0435 \u0443\u0436\u0435 31\u00a0\u0433\u043e\u0434, \u0432\u00a0\u043d\u0435\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432\u0435\u0441\u0435\u043b\u043e \u0438\u0433\u0440\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u043c\u0443 (\u0445\u043e\u0442\u044f \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0443\u00a0\u043c\u0435\u043d\u044f \u0442\u0430\u043a \u0441\u0435\u0431\u0435) \u0438\u043b\u0438\u00a0\u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430\u00a0\u0442\u043e, \u043a\u0430\u043a\u00a0\u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u00a0\u043d\u0435\u0435 \u0438\u0433\u0440\u0430\u044e\u0442 (\u0432\u043e\u0442 \u0432\u00a0\u044d\u0442\u043e\u043c \u044f \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u0441\u0435\u0431\u044f \u043b\u0443\u0447\u0448\u0435); \u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440\u044b \u043e\u0442\u043a\u0440\u044b\u0442, \u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u0439 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u00a0\u2014 \u041f\u041a, \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d, <a href=\"https:\/\/youtu.be\/7gCZZkBATSc\">\u043a\u0430\u043c\u0435\u0440\u0430<\/a>, <a href=\"https:\/\/youtu.be\/xZaKlLyikKg\">\u043e\u0441\u0446\u0438\u043b\u043b\u043e\u0441\u043a\u043e\u043f<\/a>\u00a0\u2014 \u0434\u0430\u00a0\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430\u00a0\u043b\u044e\u0431\u043e\u0439 \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0434\u0435\u0442 \u0432\u0430\u043c \u0432\u00a0\u0433\u043e\u043b\u043e\u0432\u0443. \u0412\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0447\u0435\u0433\u043e, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0440\u044f\u0434\u0443 \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432, \u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043c\u0435\u0438\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0DOOM \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432\u00a0Fedora Linux.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0437\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0434\u043e\u00a0\u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430, \u043f\u0440\u043e\u0435\u043a\u0442 Fedora Linux \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0432\u0441\u0435\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u042d\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u00a0\u2014 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432\u00a0\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 ABI, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u00a0\u043b\u0438\u043d\u043a\u0443\u0435\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u041a\u0430\u043a\u00a0\u0431\u044b \u0442\u043e \u043d\u0438\u00a0\u0431\u044b\u043b\u043e, \u0441\u00a0\u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0430 Fedora Linux 42\u00a0\u0432\u00a0\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u0430\u043f\u0440\u0435\u043b\u044f, \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f\u00a0\u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438, \u0438 \u043a\u0430\u043a\u00a0\u0447\u0430\u0441\u0442\u043e\u00a0\u0431\u044b\u0432\u0430\u0435\u0442, \u043d\u0435\u00a0\u0432\u0441\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u0432\u044b\u0436\u0438\u043b\u0438. \u041e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u00a0\u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f <code>chocolate-doom<\/code>.<\/p>\n<h2>\u0414\u0432\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0434\u044b \u043f\u0440\u0430\u0432\u0434\u0443 \u043d\u0435 \u0434\u0430\u044e\u0442<\/h2>\n<p>\u041b\u0430\u0434\u043d\u0435\u043d\u044c\u043a\u043e, \u0447\u0442\u043e \u043f\u043e\u0434\u0435\u043b\u0430\u0442\u044c. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043b\u043e\u0433\u0438 \u0441\u0431\u043e\u0440\u043a\u0438.<\/p>\n<pre><code class=\"bash\">gcc -DHAVE_CONFIG_H -I. -I..\/..    -I..\/..\/src -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT -O2 -g -Wall -Wdeclaration-after-statement -Wredundant-decls -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=\/usr\/lib\/rpm\/redhat\/redhat-hardened-cc1 -fstack-protector-strong -specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -I\/usr\/include\/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT  -I\/usr\/include\/libpng16 -DWITH_GZFILEOP -I\/usr\/include\/pipewire-0.3 -I\/usr\/include\/spa-0.2 -D_REENTRANT -I\/usr\/lib64\/pkgconfig\/..\/..\/include\/dbus-1.0 -I\/usr\/lib64\/pkgconfig\/..\/..\/lib64\/dbus-1.0\/include -I\/usr\/include\/libinstpatch-2 -I\/usr\/include\/glib-2.0 -I\/usr\/lib64\/glib-2.0\/include -I\/usr\/include\/sysprof-6 -pthread -I\/usr\/include\/opus -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -c -o deh_bexstr.o deh_bexstr.c In file included from ..\/..\/src\/sha1.h:21,                  from ..\/..\/src\/deh_defs.h:21,                  from deh_bexstr.c:22: ..\/..\/src\/doomtype.h:113:5: error: cannot use keyword \u2018false\u2019 as enumeration constant   113 |     false,       |     ^~~~~ ..\/..\/src\/doomtype.h:113:5: note: \u2018false\u2019 is a keyword with \u2018-std=c23\u2019 onwards<\/code><\/pre>\n<p>\u0410\u0433\u0430, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430\u00a0\u0431\u044b\u043b\u0430 \u043d\u0430\u00a0\u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u043c\u043d\u043e\u0433\u0438\u0445 \u043b\u0435\u0442 \u043e\u0431\u0432\u0438\u043d\u0435\u043d\u0438\u0439 \u0432\u00a0\u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u0445 \u043e\u0431\u00a0\u043e\u0448\u0438\u0431\u043a\u0435, GCC \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0438,\u00a0\u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u00a0\u0447\u0435\u043c \u0434\u0435\u043b\u043e. \u0412\u00a0\u043a\u043e\u0434\u0435 \u0434\u0432\u0438\u0436\u043a\u0430 chocolate\u2011doom \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f boolean:<\/p>\n<pre><code class=\"cpp\">#if defined(__cplusplus) || defined(__bool_true_false_are_defined)   typedef bool boolean;   #else   typedef enum  {     false,      true } boolean; #endif<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a\u00a0C++, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0438\u043f <code>bool<\/code> \u0438\u0437\u00a0C++, \u0430\u00a0\u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u00a0C\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0438\u043f. \u042d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430\u043c\u0438 C, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u00a0C89\u00a0\u043d\u0435\u00a0\u0431\u044b\u043b\u043e \u0442\u0438\u043f\u0430 boolean \u043a\u0430\u043a\u00a0\u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e, \u0430\u00a0\u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u00a0C99\u00a0\u0442\u0438\u043f \u043d\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f <code>_Bool<\/code>\u00a0\u2014 \u0445\u043e\u0442\u044f\u00a0\u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a <code>&lt;stdbool.h&gt;<\/code>, \u0434\u043b\u044f\u00a0\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0432\u0448\u0438\u0439 \u043c\u0430\u043a\u0440\u043e\u0441\u044b <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code>. \u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u00a0C23, <code>_Bool<\/code> \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d \u0432 <code>bool<\/code>, \u0430\u00a0\u0442\u0440\u043e\u0438\u0446\u0430 <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code> \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<p>\u041e\u043a\u0435\u0439, \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0447\u0442\u043e\u00a0\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0442\u0438\u043f boolean \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0443\u0435\u0442 \u0441\u00a0\u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 <code>false<\/code> \u0438 <code>true<\/code>\u00a0\u2014 \u043d\u043e\u00a0\u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u0435\u0441\u043b\u0438 \u043f\u0430\u0440\u0443 \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e? \u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u0431\u043e\u0440\u043a\u0430 \u0438\u0434\u0435\u0442 \u0441\u00a0C23?<\/p>\n<h2>\u0412\u043f\u043e\u043b\u043d\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435  <\/h2>\n<p>\u041a\u0430\u043a\u00a0\u044f \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u043e\u0432 \u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0430\u0434, \u043e\u0434\u043d\u0430 \u0438\u0437\u00a0\u0446\u0435\u043b\u0435\u0439 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438\u00a0\u2014 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u0434\u0438\u0441\u0442\u0438\u0431\u0443\u0442\u0438\u0432 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u00a0\u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u0445. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/gcc.gnu.org\/releases.html\">\u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0432\u0435\u0440\u0441\u0438\u0439 GCC<\/a>, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u00a0\u043d\u0430\u00a0\u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 10\u00a0\u043b\u0435\u0442 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0430\u0436\u043e\u0440\u043d\u043e\u0433\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0432\u00a0\u0433\u043e\u0434 \u0433\u0434\u0435\u2011\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0430\u043f\u0440\u0435\u043b\u0435\u043c \u0438 \u043c\u0430\u0435\u043c, \u0447\u0442\u043e\u00a0\u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0440\u0435\u043b\u0438\u0437\u043e\u0432 Fedora Linux, \u0434\u0435\u043b\u0430\u044f \u0435\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u043e\u0439 \u0434\u043b\u044f\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u2011\u0440\u0435\u043b\u0438\u0437\u043e\u0432 GCC \u043d\u0430\u00a0\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043d\u0435\u00a0\u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u00a0\u2014 <a href=\"https:\/\/koji.fedoraproject.org\/koji\/buildinfo?buildID=2615313\">GCC 15.0.1<\/a> \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u00a0Fedora Rawhide (\u0432\u0435\u0440\u0441\u0438\u044f \u00ab\u0432\u0435\u0447\u043d\u043e\u0439 \u0430\u043b\u044c\u0444\u044b\u00bb \u0434\u043b\u044f\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438) \u0437\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432 \u0434\u043e\u00a0\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0438. \u0412 <a href=\"https:\/\/gcc.gnu.org\/gcc-15\/porting_to.html\">\u0447\u0435\u043d\u0434\u0436\u043b\u043e\u0433\u0435 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438<\/a> \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0435\u0441\u044f \u043a\u00a0\u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435\u00a0\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C \u043f\u043e\u00a0\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e\u00a0\u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0441 <code>-std=gnu17<\/code> \u043d\u0430 <code>-std=gnu23<\/code>. \u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0432\u0435\u0440\u043d\u0435\u0442\u0435\u0441\u044c \u043d\u0430\u0437\u0430\u0434 \u0438 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u00a0\u0432\u00a0\u043d\u0435\u0439 \u043d\u0435\u0442 \u043e\u043f\u0446\u0438\u0438 <code>-std=<\/code>, \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u00a0\u0442\u0435\u043f\u0435\u0440\u044c? \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0432, \u044f \u043f\u0440\u0438\u0448\u0435\u043b \u043a\u00a0\u0442\u0440\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c:<\/p>\n<ol>\n<li>\n<p>\u042f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 C, \u0443\u043a\u0430\u0437\u0430\u0432 C17\u00a0\u0438\u043b\u0438\u00a0\u0441\u0442\u0430\u0440\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f \u0441\u00a0\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c <code>boolean<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 <code>#ifdef<\/code> \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f <code>bool<\/code> \u043f\u0440\u0438\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 C23.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b <code>enum<\/code> \u0432 <code>False<\/code> \u0438 <code>True<\/code> \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0441\u0442\u0430, \u0433\u0434\u0435 \u043e\u043d\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u043f\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e\u00a0\u043f\u043e\u00a0\u0441\u0443\u0442\u0438\u00a0\u2014 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u043f\u043e\u0442\u043e\u043c, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u0432\u00a0\u0446\u0435\u043b\u043e\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439. \u0422\u0440\u0435\u0442\u044c\u044f \u043e\u043f\u0446\u0438\u044f\u00a0\u2014 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f, \u043d\u043e\u00a0\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043c\u0443\u0442\u043e\u0440\u043d\u0430\u044f. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0441\u043b\u0438\u0432, \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<pre><code class=\"cpp\">--- a\/src\/doomtype.h +++ b\/src\/doomtype.h @@ -100,9 +100,9 @@    #include &lt;inttypes.h&gt;   -#if defined(__cplusplus) || defined(__bool_true_false_are_defined) +#if defined(__cplusplus) || defined(__bool_true_false_are_defined) || (__STDC_VERSION__ &gt;= 202311L)   -\/\/ Use builtin bool type with C++. +\/\/ Use builtin bool type with C++ and C23.    typedef bool boolean;<\/code><\/pre>\n<p>\u041f\u0430\u0442\u0447 \u0431\u044b\u043b \u043d\u0435\u0441\u043b\u043e\u0436\u0435\u043d \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442 \u0434\u043b\u044f Fedora \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u0441\u044f. \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438 \u043b\u0435\u0433\u043a\u0438\u043c \u0444\u0438\u043a\u0441\u043e\u043c, \u044f \u043e\u0442\u043a\u0440\u044b\u043b <a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/pull\/1722\">pull request \u0432 \u0430\u043f\u0441\u0442\u0440\u0438\u043c\u0435<\/a>.  <\/p>\n<h2>\u0414\u0432\u0438\u0436\u043e\u043a \u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u0443\u043c  <\/h2>\n<p>\u041c\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u0435\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0438 \u043c\u0435\u0438\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u00a0\u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e\u00a0\u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u00a0C99. \u041e\u0434\u0438\u043d \u0438\u0437\u00a0\u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/pull\/1723\">\u0435\u0449\u0435 \u043e\u0434\u0438\u043d pull request<\/a>: <\/p>\n<pre><code class=\"cpp\">--- a\/src\/doomtype.h +++ b\/src\/doomtype.h @@ -99,12 +99,11 @@  \/\/ standard and defined to include stdint.h, so include this.     #include &lt;inttypes.h&gt; +#include &lt;stdbool.h&gt;    #if defined(__cplusplus) || defined(__bool_true_false_are_defined)   -\/\/ Use builtin bool type with C++. - -typedef bool boolean; +typedef int boolean;    #else<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 <code>#include<\/code> \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f C99, <code>&lt;stdbool.h&gt;<\/code> \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>bool<\/code>, <code>true<\/code> \u0438 <code>false<\/code>. \u041d\u043e\u00a0\u0432\u043e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 <code>typedef<\/code>\u00a0\u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u00a0\u2014 \u043e\u043d\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e, \u0447\u0442\u043e\u00a0\u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430\u00a0\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a\u00a0C99, \u043a\u043e\u0434 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0431\u0443\u043b\u0435\u0432\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u00a0\u0432\u0438\u0434\u0435 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 <code>bool<\/code>\/<code>_Bool<\/code>. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0439 \u0434\u0438\u0441\u043a\u0443\u0441\u0441\u0438\u0438:<\/p>\n<blockquote>\n<p><strong><em>&lt;turol&gt;<\/em><\/strong><em><br \/>Explicitly setting the C standard is fine but we shouldn&#8217;t change the includes or boolean type.<\/em><\/p>\n<p><strong><em>&lt;fabiangreffrath&gt;<\/em><\/strong><em><br \/>Chocolate Doom doesn&#8217;t even start if we keep\u00a0<\/em><code>#typedef bool boolean<\/code>.<\/p>\n<p><strong><em>&lt;suve&gt;<\/em><\/strong><em><br \/>What do you mean by &#171;doesn&#8217;t even start&#187;? Crashes right away? Including\u00a0<\/em><code>&lt;stdbool.h&gt;<\/code>\u00a0adds the\u00a0<code>#define bool _Bool<\/code>\u00a0macro, so keeping\u00a0<code>typedef bool boolean<\/code>\u00a0means you&#8217;re using the C99\u00a0<code>_Bool<\/code>\u00a0type.<\/p>\n<p><strong><em>&lt;fabiangreffrath&gt;<\/em><\/strong><em><br \/>It fails with:\u00a0<\/em><code>R_InitSprites: Sprite TROO frame I has rotations and a rot=0 lump<\/code>.<\/p>\n<\/blockquote>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041f\u043e\u0445\u043e\u0436\u0435, \u0447\u0442\u043e\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>_Bool<\/code> \u0434\u043b\u044f\u00a0\u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043e\u0431\u0440\u0435\u043a\u0430\u0435\u0442 \u0434\u0432\u0438\u0436\u043e\u043a \u043d\u0430\u00a0\u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c. \u0418\u0437\u00a0\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u00a0\u043e\u0448\u0438\u0431\u043a\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0432\u00a0<a href=\"https:\/\/github.com\/chocolate-doom\/chocolate-doom\/blob\/chocolate-doom-3.1.0\/src\/doom\/r_things.c#L136\">\u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430<\/a> \u043e\u043d\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442: <\/p>\n<pre><code class=\"cpp\">if (sprtemp[frame].rotate == false)     I_Error (\"R_InitSprites: Sprite %s frame %c has rotations \"          \"and a rot=0 lump\", spritename, 'A'+frame);<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e\u00a0\u0436\u0435 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442? \u042f \u043d\u0435\u00a0\u0431\u0443\u0434\u0443 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u0443\u0441\u043a\u0438 \u043a\u043e\u0434\u0430 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0440\u0430\u0442\u043a\u043e \u043f\u0435\u0440\u0435\u0441\u043a\u0430\u0436\u0443:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>R_InstallSpriteLump()<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>frame<\/code>\u00a0\u2014 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418 \u0445\u043e\u0442\u044c \u043e\u043d \u0438 \u043d\u0435\u00a0\u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <code>const<\/code>, \u043e\u043d \u043d\u0435\u00a0\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><code>sprtemp<\/code>\u00a0\u2014 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437 29\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <code>spriteframe_t<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0435 <code>.rotate<\/code> \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <code>boolean<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f: \u043a\u043e\u0433\u0434\u0430 boolean\u00a0\u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 enum\u2011\u0442\u0438\u043f, \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a\u00a0\u0438 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>false<\/code>; \u043d\u043e\u00a0\u043f\u0440\u0438\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>_Bool<\/code> \u043e\u043d\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>true<\/code> \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a\u00a0\u0432\u044b\u0445\u043e\u0434\u0443 \u0441\u00a0\u043e\u0448\u0438\u0431\u043a\u043e\u0439. \u0417\u0432\u0443\u0447\u0438\u0442 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u2026 \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0442\u044b\u043a\u0430\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>gdb<\/code>. \u041d\u0430\u0447\u043d\u0435\u043c \u0441\u00a0\u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<pre><code class=\"bash\">$ gdb .\/build\/src\/chocolate-doom--enum [...] (gdb) break src\/doom\/r_things.c:138 Breakpoint 1 at 0x44f822: file chocolate-doom\/src\/doom\/r_things.c, line 138. (gdb) run [...] Thread 1 \"chocolate-doom\" hit Breakpoint 1, R_InstallSpriteLump (lump=1242, frame=0, rotation=1, flipped=false) at chocolate-doom\/src\/doom\/r_things.c:138 138     if (sprtemp[frame].rotate == false) (gdb) print sprtemp[frame] $1 = {rotate = (true | unknown: 0xfffffffe), lump = {-1, -1, -1, -1, -1, -1, -1, -1}, flip = \"\\377\\377\\377\\377\\377\\377\\377\\377\"} (gdb) step 142     sprtemp[frame].rotate = true;<\/code><\/pre>\n<p>\u041e\u043a\u0435\u0439, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e <code>boolean<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u2026 \u044d\u043c, \u0447\u0435\u0433\u043e? \u041d\u043e\u0442\u0430\u0446\u0438\u044f \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0442\u0430\u043b\u0430, \u043d\u043e\u00a0\u043f\u043e\u0445\u043e\u0436\u0435 \u0447\u0442\u043e\u00a0\u0438\u0437\u2011\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u0442\u0438\u043f <code>boolean<\/code>\u00a0\u2014 <code>enum<\/code>, <code>gdb<\/code> \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043c\u043e\u0447\u044c, \u043f\u043e\u043a\u0430\u0437\u0430\u0432 \u043a\u0430\u043a\u00a0\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u0438\u0442\u043e\u0432\u043e\u0435 \u0418\u041b\u0418\u00a0\u0441\u00a0\u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 <code>enum<\/code>. (\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u043d\u0435\u00a0\u043e\u0441\u043e\u0431\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435.) \u041a\u0430\u043a\u00a0\u0431\u044b \u0442\u043e \u043d\u0438\u00a0\u0431\u044b\u043b\u043e, <code>true<\/code> \u044d\u0442\u043e <code>1<\/code> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0442\u043e\u0432\u043e\u0433\u043e \u0418\u041b\u0418\u00a0\u0441 \u00ab\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c\u00bb \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>0xffffffff<\/code>, \u0447\u0442\u043e\u00a0\u0442\u043e\u043b\u043a\u0430\u0435\u0442 \u043d\u0430\u00a0\u043c\u044b\u0441\u043b\u044c \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u043f\u043e\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0437\u0430\u043f\u0438\u0441\u0438 <code>-1<\/code> \u043d\u0430\u00a0\u043e\u0434\u043d\u043e\u043c \u0438\u0437\u00a0\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432. \u0422\u0430\u043a \u0438 \u0435\u0441\u0442\u044c, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0431\u044d\u043a\u0442\u0440\u0435\u0439\u0441 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043c\u044b \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u044b\u0437\u043e\u0432 <code>memset (sprtemp,-1, sizeof(sprtemp));<\/code>.<\/p>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u043a\u0430\u043a\u00a0\u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439 \u043c\u0435\u043d\u044c\u0448\u0435. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a\u00a0\u0431\u0440\u0435\u0439\u043a\u043f\u043e\u0438\u043d\u0442\u0443, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 <code>0xffffffff<\/code> \u0438 <code>0x0<\/code>, \u0447\u0442\u043e\u00a0\u0434\u0430\u0435\u0442 \u043d\u0430\u043c <code>false<\/code>. \u041b\u043e\u0433\u0438\u0447\u043d\u043e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430\u00a0\u0432\u0435\u0440\u0441\u0438\u044e <code>_Bool<\/code>.<\/p>\n<pre><code class=\"bash\">$ gdb .\/build\/src\/chocolate-doom--bool [...] (gdb) break src\/doom\/r_things.c:138 Breakpoint 1 at 0x44f822: file<\/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-446604","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446604","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=446604"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/446604\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}