public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
* gcc-wwwdocs branch master updated. cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3
@ 2021-02-10  0:13 Martin Sebor
  0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2021-02-10  0:13 UTC (permalink / raw)
  To: gcc-cvs-wwwdocs

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".

The branch, master has been updated
       via  cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3 (commit)
      from  50799430175044fffb23c6559c8029d6b8534746 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3
Author: Martin Sebor <msebor@redhat.com>
Date:   Tue Feb 9 17:12:16 2021 -0700

    Update new attribute malloc and document new and enhanced warnings.

diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html
index 63efaf37..80d39b73 100644
--- a/htdocs/gcc-11/changes.html
+++ b/htdocs/gcc-11/changes.html
@@ -179,21 +179,47 @@ a work-in-progress.</p>
 	<li>The existing
 	  <a href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute"><code>malloc</code></a>
 	  attribute has been extended so that it can be used to identify
-	  allocator/deallocator API pairs.  A new
-	  <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#-Wmismatched-dealloc"><code>-Wmismatched-dealloc</code></a>
-	  warning will complain about incorrect calls.  Additionally, the
-	  static analyzer will use these attributes when checking for leaks,
-	  double-frees, use-after-frees, and similar issues.
+	  allocator/deallocator API pairs.  A pair of new
+	  <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmismatched-dealloc"><code>-Wmismatched-dealloc</code></a> and <a href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-new-delete"><code>-Wmismatched-new-delete</code></a> warnings will complain
+	  about mismatched calls, and <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wfree-nonheap-object"><code>-Wfree-nonheap-object</code></a> about deallocation calls with pointers not obtained from allocation
+	  functions.  Additionally, the static analyzer will use these
+	  attributes when checking for leaks, double-frees, use-after-frees,
+	  and similar issues.
 	</li>
     </ul>
   <li>New warnings:
     <ul>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmismatched-dealloc"><code>-Wmismatched-dealloc</code></a>,
+	enabled by default, warns about calls to deallocation functions
+	with pointers returned from mismatched allocation functions.
+      </li>
       <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsizeof-array-div"><code>-Wsizeof-array-div</code></a>,
 	  enabled by <code>-Wall</code>, warns
 	  about divisions of two sizeof operators when the first one is applied
 	  to an array and the divisor does not equal the size of the array
 	  element.
       </li>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-overread"><code>-Wstringop-overread</code></a>,
+	enabled by default, warns about calls to string functions reading
+	past the end of the arrays passed to them as arguments.  In prior
+	GCC releases most instances of his warning are diagnosed by
+	<code>-Wstringop-overflow</code>.
+      </li>
+    </ul>
+  </li>
+  <li>Enhancements to existing warnings:
+    <ul>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wfree-nonheap-object"><code>-Wfree-nonheap-object</code></a>
+	detects many more instances of calls to deallocation functions with
+	pointers not returned from a dynamic memory allocation function.
+      </li>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wmaybe-uninitialized"><code>-Wmaybe-uninitialized</code></a>
+	diagnoses passing pointers or references to uninitialized memory
+	to functions taking <code>const</code>-qualified arguments.
+      </li>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wuninitialized"><code>-Wuninitialized</code></a>
+	detects reads from uninitialized dynamically allocated memory.
+      </li>
     </ul>
   </li>
   <li>
@@ -275,6 +301,22 @@ a work-in-progress.</p>
     <li>Labels may appear before declarations and at the end of a
     compound statement.</li>
   </ul></li>
+  <li>New warnings:
+    <ul>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Warray-parameter"><code>-Warray-parameter</code></a>,
+	enabled by <code>-Wall</code>, warns about redeclarations of functions
+	with ordinary array arguments declared using inconsistent forms.
+	The warning also enables the detection of the likely out of bounds
+	accesses in calls to such functions with smaller arrays.
+      </li>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wvla-parameter"><code>-Wvla-parameter</code></a>,
+	enabled by <code>-Wall</code>, warns redeclarations of functions
+	with variable length array arguments declared using inconsistent
+	forms or with mismatched bounds.  The warning also enables
+	the detection of the likely out of bounds accesses in calls to
+	such functions with smaller arrays.
+      </li>
+    </ul>
 </ul>
 
 <h3 id="cxx">C++</h3>
@@ -351,12 +393,27 @@ a work-in-progress.</p>
 	  one is of enumeration type and the other is of a floating-point type,
 	  as outlined in <em>[depr.arith.conv.enum]</em>.
       </li>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html#index-Wmismatched-new-delete"><code>-Wmismatched-new-delete</code></a>,
+	enabled by <code>-Wall</code>, warns about calls to C++
+	<code>operator delete</code> with pointers returned from mismatched
+	forms of <code>operator new</code> or from other mismatched allocation
+	functions.
+      </li>
       <li><code>-Wvexing-parse</code>, enabled by default, warns about the most
 	  vexing parse rule: the cases when a declaration looks like a variable
 	  definition, but the C++ language requires it to be interpreted as a
 	  function declaration.
       </li>
     </ul>
+  <li>Enhancements to existing warnings:
+    <ul>
+      <li><a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wnonnull"><code>-Wnonnull</code></a>
+	considers the implicit <code>this</code> argument of every C++
+	nonstatic member function to have been implicitly declared with
+	attribute <code>nonnull</code> and triggers warnings for calls where
+	the pointer is null.
+      </li>
+    </ul>
   </li>
 </ul>
 

-----------------------------------------------------------------------

Summary of changes:
 htdocs/gcc-11/changes.html | 67 ++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 62 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
gcc-wwwdocs


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-10  0:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-10  0:13 gcc-wwwdocs branch master updated. cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3 Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).