From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1930) id 51EAF386F81D; Wed, 10 Feb 2021 00:13:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51EAF386F81D To: gcc-cvs-wwwdocs@gcc.gnu.org Subject: gcc-wwwdocs branch master updated. cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 50799430175044fffb23c6559c8029d6b8534746 X-Git-Newrev: cf0d4e41a94bae204a8c5d2490063d58cdb1d4e3 Message-Id: <20210210001320.51EAF386F81D@sourceware.org> Date: Wed, 10 Feb 2021 00:13:20 +0000 (GMT) From: Martin Sebor X-BeenThere: gcc-cvs-wwwdocs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs-wwwdocs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 00:13:20 -0000 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 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.

  • The existing malloc attribute has been extended so that it can be used to identify - allocator/deallocator API pairs. A new - -Wmismatched-dealloc - 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 + -Wmismatched-dealloc and -Wmismatched-new-delete warnings will complain + about mismatched calls, and -Wfree-nonheap-object 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.
  • New warnings:
      +
    • -Wmismatched-dealloc, + enabled by default, warns about calls to deallocation functions + with pointers returned from mismatched allocation functions. +
    • -Wsizeof-array-div, enabled by -Wall, 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.
    • +
    • -Wstringop-overread, + 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 + -Wstringop-overflow. +
    • +
    +
  • +
  • Enhancements to existing warnings: +
      +
    • -Wfree-nonheap-object + detects many more instances of calls to deallocation functions with + pointers not returned from a dynamic memory allocation function. +
    • +
    • -Wmaybe-uninitialized + diagnoses passing pointers or references to uninitialized memory + to functions taking const-qualified arguments. +
    • +
    • -Wuninitialized + detects reads from uninitialized dynamically allocated memory. +
  • @@ -275,6 +301,22 @@ a work-in-progress.

  • Labels may appear before declarations and at the end of a compound statement.
  • +
  • New warnings: +
      +
    • -Warray-parameter, + enabled by -Wall, 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. +
    • +
    • -Wvla-parameter, + enabled by -Wall, 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. +
    • +

    C++

    @@ -351,12 +393,27 @@ a work-in-progress.

    one is of enumeration type and the other is of a floating-point type, as outlined in [depr.arith.conv.enum].
  • +
  • -Wmismatched-new-delete, + enabled by -Wall, warns about calls to C++ + operator delete with pointers returned from mismatched + forms of operator new or from other mismatched allocation + functions. +
  • -Wvexing-parse, 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.
  • +
  • Enhancements to existing warnings: +
      +
    • -Wnonnull + considers the implicit this argument of every C++ + nonstatic member function to have been implicitly declared with + attribute nonnull and triggers warnings for calls where + the pointer is null. +
    • +
  • ----------------------------------------------------------------------- Summary of changes: htdocs/gcc-11/changes.html | 67 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 5 deletions(-) hooks/post-receive -- gcc-wwwdocs