From patchwork Tue Sep 8 17:14:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= X-Patchwork-Id: 515470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3202F14010F for ; Wed, 9 Sep 2015 03:15:15 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=OjkHKeO6; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=NnYNHPxh6bXnNTI8yXKINI7GSgpudig1T73her7d2wGKfK cL4ApkqGFVehttl60PVYOl4EOzhigcktnQPHpE/+YH8CI2NTxDd/K666lmKDZ01+ QZKQ1TmckBgPf6kVU4v3Yc2J/DsDw+vjWiD/CwpSgYEu/m0s8/n2C8Doa5J3s= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=mAiNihSar2hrqejeTw6oMpEPnL4=; b=OjkHKeO6TTmm1QFXiBR4 +/lcuAHKC+hRD8q7d9PamO7Ke9J+2Cv60QiPvaMQiRNLdUUI53tzMPQ923vwfPG5 Gr07JAj5laDuJYS7FePTY1neI/C8zLh4ILWnDFE6R435UXRga2ASidWZmwvC7mx6 aAaBtSBYJBFSIL0PPdwO/eI= Received: (qmail 59899 invoked by alias); 8 Sep 2015 17:15:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 59888 invoked by uid 89); 8 Sep 2015 17:15:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_05, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 08 Sep 2015 17:15:06 +0000 Received: by wicgb1 with SMTP id gb1so86525502wic.1 for ; Tue, 08 Sep 2015 10:15:03 -0700 (PDT) X-Received: by 10.194.192.166 with SMTP id hh6mr47053146wjc.127.1441732502980; Tue, 08 Sep 2015 10:15:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.186.214 with HTTP; Tue, 8 Sep 2015 10:14:23 -0700 (PDT) From: =?UTF-8?B?TWFudWVsIEzDs3Blei1JYsOhw7Fleg==?= Date: Tue, 8 Sep 2015 19:14:23 +0200 Message-ID: Subject: [wwwdocs] Document some gcc-6 changes To: Gcc Patch List , Gerald Pfeifer I also took the liberty of rewriting the list of new command-line options to be less repetitive. OK? -fdelete-null-pointer-checks is active, which is enabled by optimizations in most targets. The precision of the warnings depends on the optimization options used. +

C

Index: htdocs/gcc-6/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.26 diff -u -r1.26 changes.html --- htdocs/gcc-6/changes.html 4 Sep 2015 09:33:28 -0000 1.26 +++ htdocs/gcc-6/changes.html 8 Sep 2015 17:12:23 -0000 @@ -43,18 +43,26 @@ oldval __attribute__ ((deprecated ("too old"))) }; -
  • A new command-line option -Wshift-negative-value has been - added for the C and C++ compilers, which warns about left shifting +
  • Initial support for precise diagnostic locations within strings: +
    +format-strings.c:3:14: warning:
    field width specifier '*' expects a matching 'int'
    argument [-Wformat=]
    +   printf("%*d");
    +            ^
    +
  • + +
  • New command-line options have been added for the C and C++ compilers: +
      +
    • -Wshift-negative-value warns about left shifting a negative value.
    • -
    • A new command-line option -Wshift-overflow has been - added for the C and C++ compilers, which warns about left shift +
    • -Wshift-overflow warns about left shift overflows. -Wshift-overflow=2 also warns about left-shifting 1 into the sign bit. This warning is enabled by default.
    • -
    • A new command-line option -Wtautological-compare has been - added for the C and C++ compilers, which warns if a self-comparison +
    • -Wtautological-compare warns if a self-comparison always evaluates to true or false. This warning is enabled by -Wall.
    • +
    • -Wnull-dereference warns if the compiler detects paths that trigger erroneous or undefined behavior due to dereferencing a null pointer. This option is only active when