From patchwork Fri Jan 15 18:02:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 568251 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 8F981140BB5 for ; Sat, 16 Jan 2016 05:03:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RPQRdTdY; 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 :message-id:subject:from:to:date:in-reply-to:references :content-type:mime-version; q=dns; s=default; b=MBPPk1TrfX0Ms+G8 P1GiGtU188pMyQ+MrsnBKZ3AR6W21ciPgFUY+WzCvHEhrqk/IM3crE8W/JPgUqYj 9AVaPc0FGPlzEHg+eEV8KH6VTQvToNNyVkZKg3ssGqkokB398HCvaKfW1U7Fgb40 gFmoUhSiXd7VBC58JlcFsqAGjdM= 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 :message-id:subject:from:to:date:in-reply-to:references :content-type:mime-version; s=default; bh=sbRRKGagvwvGt3bQc1WWPV F70x0=; b=RPQRdTdYbNohFnhEXYeTxcli5uQH2RtwlgGhy+2Gs/USM3pjPLdtmM vNPkTfv3gELsjqV+qHpNyZWoLsbQ3Osc6FUzIqfaB3/v0QfjsX5PfZp7kgz/0bDE AyzMA9S8Zx97WGSXjSPuJXvEi2ABNRLgDPs1GeSnkFuf6usu1B6HM= Received: (qmail 7442 invoked by alias); 15 Jan 2016 18:02:54 -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 7415 invoked by uid 89); 15 Jan 2016 18:02:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=colour, UD:html, v, sk:spellch, htdocs X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 15 Jan 2016 18:02:51 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 7CB2A8F86D; Fri, 15 Jan 2016 18:02:50 +0000 (UTC) Received: from [10.3.224.127] (vpn-224-127.phx2.redhat.com [10.3.224.127]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0FI2nqA007165; Fri, 15 Jan 2016 13:02:49 -0500 Message-ID: <1452880969.12356.14.camel@surprise> Subject: [wwwdocs] gcc-6/changes.html: diagnostics, Levenshtein, -Wmisleading-indentation, jit (v2) From: David Malcolm To: gcc-patches@gcc.gnu.org, Gerald Pfeifer Date: Fri, 15 Jan 2016 13:02:49 -0500 In-Reply-To: <1452697208.5803.93.camel@surprise> References: <1452091846.5803.26.camel@surprise> <1452697208.5803.93.camel@surprise> Mime-Version: 1.0 X-IsSubscribed: yes On Wed, 2016-01-13 at 10:00 -0500, David Malcolm wrote: > Ping: https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00250.html > > On Wed, 2016-01-06 at 09:50 -0500, David Malcolm wrote: > > The attached patch adds information on various things to the > > gcc-6/changes.html page: > > > > * source-range-tracking (the patch merges the description of the string > > location work into this, and updates the colorization of the example to > > reflect gcc-6's behavior) > > * fix-it hints > > * hints for misspelled member names > > * -Wmisleading-indentation > > * jit improvements > > * hints for misspelled command-line options > > > > OK to commit? > > Dave Oops; I forgot to validate it; sorry. Here's an updated version of the above, which the W3C validator reports as being clean (fixing various "&" and "<" and a missing end-tag). OK to commit? Dave Index: htdocs/gcc-6/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.46 diff -u -p -r1.46 changes.html --- htdocs/gcc-6/changes.html 22 Dec 2015 19:23:31 -0000 1.46 +++ htdocs/gcc-6/changes.html 15 Jan 2016 17:58:36 -0000 @@ -63,13 +63,40 @@ enum { oldval __attribute__ ((deprecated ("too old"))) }; -
  • Initial support for precise diagnostic locations within strings: +
  • Source locations for the C and C++ compilers are now tracked as ranges, + rather than just points, making it easier to identify the subexpression + of interest within a complicated expression. + For example:
    -format-strings.c:3:14: warning: field width specifier '*' expects a matching 'int' argument [-Wformat=]
    +test.cc: In function 'int test(int, int, foo, int, int)':
    +test.cc:5:16: error: no match for 'operator*' (operand types are 'int' and 'foo')
    +   return p + q * r * s + t;
    +              ~~^~~
    +
    +In addition, there is now 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");
    -            ^
    +            ^
     
  • - +
  • Diagnostics can now contain "fix-it hints", which are displayed + in context underneath the relevant source code. For example: + +
    +fixits.c: In function 'bad_deref':
    +fixits.c:11:13: error: 'ptr' is a pointer; did you mean to use '->'?
    +   return ptr.x;
    +             ^
    +             ->
    +
  • +
  • The C and C++ compilers now offer suggestions for misspelled field names: +
    +spellcheck-fields.cc:52:13: error: 'struct s' has no member named 'colour'; did you mean 'color'?
    +   return ptr->colour;
    +               ^~~~~~
    +
  • +
  • New command-line options have been added for the C and C++ compilers:
    • -Wshift-negative-value warns about left shifting a @@ -89,8 +116,29 @@ enum { depends on the optimization options used.
    • -Wduplicated-cond warns about duplicated conditions in an if-else-if chain.
    • +
    • -Wmisleading-indentation warns about places where the + indentation of the code gives a misleading idea of the block + structure of the code to a human reader. For example, given + CVE-2014-1266: +
      +sslKeyExchange.c: In function 'SSLVerifySignedServerKeyExchange':
      +sslKeyExchange.c:631:8: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
      +        goto fail;
      +        ^~~~
      +sslKeyExchange.c:629:4: note: ...this 'if' clause, but it is not
      +    if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
      +    ^~
      +
      + This warning is enabled by -Wall.
  • +
  • The C and C++ compilers now emit saner error messages if + merge-conflict markers are present in a source file. +
    +test.c:3:1: error: version control conflict marker in file
    + <<<<<<< HEAD
    + ^~~~~~~
    +
  • C

    @@ -166,8 +214,19 @@ enum { - - +

    libgccjit

    +

    New Targets and Target Specific Improvements

    @@ -389,6 +448,12 @@ enum {

    Other significant improvements

      +
    • The gcc and g++ driver programs will now + provide suggestions for misspelled command line options. +
      +$ gcc -static-libfortran test.f95
      +gcc: error: unrecognized command line option '-static-libfortran'; did you mean '-static-libgfortran'?
      +
    • The --enable-default-pie configure option enables generation of PIE by default.