I've committed the following patch to the GCC 12 release notes. --- htdocs/gcc-12/changes.html | 47 ++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 17 deletions(-)
diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index f1c36258..5619acff 100644 --- a/htdocs/gcc-12/changes.html +++ b/htdocs/gcc-12/changes.html @@ -172,17 +172,20 @@ a work-in-progress.</p> the clang language extension was added.</li> <li>New warnings: <ul> - <li><code>-Wbidi-chars</code> warns about potentially misleading UTF-8 + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wbidi-chars"><code>-Wbidi-chars</code></a> + warns about potentially misleading UTF-8 bidirectional control characters. The default is <code>-Wbidi-chars=unpaired</code> (<a href="https://gcc.gnu.org/PR103026">PR103026</a>)</li> - <li><code>-Warray-compare</code> warns about comparisons between two operands of - array type (<a href="https://gcc.gnu.org/PR97573">PR97573</a>)</li> + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-compare"><code>-Warray-compare</code></a> + warns about comparisons between two operands of + array type (<a href="https://gcc.gnu.org/PR97573">PR97573</a>)</li> </ul> </li> <li>Enhancements to existing warnings: <ul> - <li><code>-Wattributes</code> has been extended so that it's + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wattributes"><code>-Wattributes</code></a> + has been extended so that it's possible to use <code>-Wno-attributes=ns::attr</code> or <code>-Wno-attributes=ns::</code> to suppress warnings about unknown scoped attributes (in C++11 and C2X). Similarly, @@ -208,7 +211,8 @@ a work-in-progress.</p> <li>The <code>#elifdef</code> and <code>#elifndef</code> preprocessing directives are now supported.</li> <li>The <code>printf</code> and <code>scanf</code> format checking - with <code>-Wformat</code> now supports the <code>%b</code> format + with <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat"><code>-Wformat</code></a> + now supports the <code>%b</code> format specified by C2X for binary integers, and the <code>%B</code> format recommended by C2X for <code>printf</code>. </ul></li> @@ -263,10 +267,12 @@ a work-in-progress.</p> (<a href="https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=87c2080b">git</a>)</li> <li>Deduction guides can be declared at class scope (<a href="https://gcc.gnu.org/PR79501">PR79501</a>)</li> - <li><code>-Wuninitialized</code> warns about using uninitialized variables in + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wuninitialized"><code>-Wuninitialized</code></a> + warns about using uninitialized variables in member initializer lists (<a href="https://gcc.gnu.org/PR19808">PR19808</a>) </li> - <li><code>-Wint-in-bool-context</code> is now disabled when instantiating + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wint-in-bool-context"><code>-Wint-in-bool-context</code></a> + is now disabled when instantiating a template (<a href="https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3a2b12bc">git</a>)</li> <li>Stricter checking of attributes on friend declarations: if a friend declaration has an attribute, that declaration must be a definition. @@ -279,13 +285,15 @@ a work-in-progress.</p> and <code>-Wc++23-extensions</code>. They are enabled by default and can be used to control existing pedwarns about occurences of new C++ constructs in code using an old C++ standard dialect.</li> - <li>New warning <code>-Wmissing-requires</code> warns about missing - <code>requires</code> + <li>New warning + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmissing-requires"><code>-Wmissing-requires</code></a> + warns about missing <code>requires</code> (<a href="https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=e18e56c7">git</a>)</li> <li>The existing <code>std::is_constant_evaluated</code> in <code>if</code> warning was extended to warn in more cases (<a href="https://gcc.gnu.org/PR100995">PR100995</a>)</li> - <li><code>-Waddress</code> has been enhanced so that it now warns about, for + <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Waddress"><code>-Waddress</code></a> + has been enhanced so that it now warns about, for instance, comparing the address of a nonstatic member function to null (<a href="https://gcc.gnu.org/PR102103">PR102103</a>)</li> <li>Errors about narrowing are no longer hidden if they occur in system @@ -307,7 +315,9 @@ a work-in-progress.</p> <li><code>constinit thread_local</code> variables are optimized better (<a href="https://gcc.gnu.org/PR101786">PR101786</a>)</li> <li>Support for C++17 <code>std::hardware_destructive_interference_size</code> - was added, along with the <code>-Winterference-size</code> warning + was added, along with the + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Winterference-size"><code>-Winterference-size</code></a> + warning (<a href="https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=76b75018">git</a>)</li> <li>Many bugs in the CTAD handling have been fixed (<a href="https://gcc.gnu.org/PR101344">PR101344</a>, @@ -618,16 +628,19 @@ a work-in-progress.</p> <h3 id="uninitialized">Eliminating uninitialized variables</h3> <ul> - <li>GCC can now initialize all stack variables implicitly, including + <li>GCC can now <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init">initialize all stack variables implicitly</a>, including padding. This is intended to eliminate all classes of uninitialized stack variable flaws. Lack of explicit initialization will still - warn when <code>-Wuninitialized</code> is active. For best - debugging, use of the new command-line option - <code>-ftrivial-auto-var-init=pattern</code> can be used to fill - variables with a repeated <code>0xFE</code> pattern, which tends to + warn when + <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wuninitialized"><code>-Wuninitialized</code></a> + is active. For best debugging, use of the new command-line option + <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init"><code>-ftrivial-auto-var-init=pattern</code></a> + can be used to fill variables with a repeated <code>0xFE</code> pattern, which tends to illuminate many bugs (e.g. pointers receive invalid addresses, sizes and indices are very large). For best production results, the new - command-line option <code>-ftrivial-auto-var-init=zero</code> can be + command-line option + <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-var-init"><code>-ftrivial-auto-var-init=zero</code></a> + can be used to fill variables with <code>0x00</code>, which tends to provide a safer state for bugs (e.g. pointers are <code>NULL</code>, strings are <code>NUL</code> filled, and sizes and indices are <code>0</code>). -- 2.30.2