public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org, David Malcolm <dmalcolm@redhat.com>
Subject: [PATCH 00/10] C++ expression ranges v4
Date: Thu, 03 Dec 2015 14:36:00 -0000	[thread overview]
Message-ID: <1449154548-43964-1-git-send-email-dmalcolm@redhat.com> (raw)
In-Reply-To: <565627A0.6040107@redhat.com>

On Wed, 2015-11-25 at 16:26 -0500, Jason Merrill wrote:
> > It's not clear to me whether I should be passing in UNKNOWN_LOCATION
> > or input_location to the various functions.
> >
> > cp_build_unary_op used input_location in various places internally,
> > so I've passed that in wherever there isn't a better value.
> 
> Rather than try to get this right now I'm inclined to save it for the 
> next stage 1 and go back to protected_set_expr_location for GCC 6.

Thanks; I've reworked the patch based on that idea.  I found whilst
bugfixing that in general it was better to use
cp_expr::set_location, which calls protected_set_expr_location,
since the former sets both the location in the tree node (if any)
*and* the shadow copy in the cp_expr (thus ensuring that compound
expressions use the correct location_t).

I've also done a lot of bugfixing, and rebased
from r230562 (Nov 18th) to r231208 (Dec 2nd).

> > Bootstraps (on x86_64-pc-linux-gnu), but regresses some tests, due to
> > changes in locations at which diagnostics are emitted:
> >
> >   c-c++-common/cilk-plus/CK/cilk_for_errors.c
> >   c-c++-common/cilk-plus/PS/for1.c
> >   c-c++-common/gomp/pr59073.c
> >   g++.dg/cpp0x/nsdmi-template14.C
> >   g++.dg/gomp/for-1.C
> >   g++.dg/gomp/pr39495-2.C
> >   g++.dg/init/new38.C
> >   g++.dg/warn/Wconversion-real-integer2.C
> >   g++.dg/warn/pr35635.C
> 
> Are the changes good or bad?

Some were bad, which I've fixed in the code.  Others were
improvements, requiring tweaks/movement of dg- directives.
I've broken out any such changes I needed to make to
specific test cases as separate patches in the kit, with notes
on each, in the hope it will make review easier.  (The kit would be
applied as a single commit; I've been testing it as one).

The following 10-patch kit bootstraps&regrtests successfully on
x86_64-pc-linux-gnu.

It adds 213 new PASS results to g++.sum, and changes the location
of 154 PASS results there.

It adds 16 new PASS results to obj-c++.sum.

OK for trunk for gcc 6?


David Malcolm (10):
  C++ FE: expression ranges v4
  Fix g++.dg/cpp0x/nsdmi-template14.C
  Fix g++.dg/gomp/loop-1.C
  Fix g++.dg/template/crash55.C
  Fix location of dg-error within g++.dg/template/pr64100.C
  Fix g++.dg/template/pseudodtor3.C
  Fix g++.dg/template/ref3.C
  Fix g++.dg/ubsan/pr63956.C
  Fix g++.dg/warn/pr35635.C
  Fix g++.dg/warn/Wconversion-real-integer2.C

 gcc/convert.c                                      |   9 +-
 gcc/cp/cp-tree.h                                   |  86 ++-
 gcc/cp/cvt.c                                       |   4 +-
 gcc/cp/name-lookup.c                               |   6 +-
 gcc/cp/name-lookup.h                               |   2 +-
 gcc/cp/parser.c                                    | 576 +++++++++++----
 gcc/cp/semantics.c                                 |  53 +-
 gcc/cp/typeck.c                                    |  42 +-
 gcc/testsuite/g++.dg/cpp0x/nsdmi-template14.C      |   4 +-
 gcc/testsuite/g++.dg/gomp/loop-1.C                 |  32 +-
 .../g++.dg/plugin/diagnostic-test-expressions-1.C  | 775 +++++++++++++++++++++
 gcc/testsuite/g++.dg/plugin/plugin.exp             |   5 +-
 gcc/testsuite/g++.dg/template/crash55.C            |   3 +-
 gcc/testsuite/g++.dg/template/pr64100.C            |   4 +-
 gcc/testsuite/g++.dg/template/pseudodtor3.C        |   4 +-
 gcc/testsuite/g++.dg/template/ref3.C               |   6 +-
 gcc/testsuite/g++.dg/ubsan/pr63956.C               |  28 +-
 .../g++.dg/warn/Wconversion-real-integer2.C        |   4 +-
 gcc/testsuite/g++.dg/warn/pr35635.C                |   6 +-
 .../plugin/diagnostic-test-expressions-1.mm        |  94 +++
 gcc/testsuite/obj-c++.dg/plugin/plugin.exp         |  90 +++
 gcc/tree.c                                         |  25 +-
 gcc/tree.h                                         |  17 +-
 23 files changed, 1632 insertions(+), 243 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/plugin/diagnostic-test-expressions-1.C
 create mode 100644 gcc/testsuite/obj-c++.dg/plugin/diagnostic-test-expressions-1.mm
 create mode 100644 gcc/testsuite/obj-c++.dg/plugin/plugin.exp

-- 
1.8.5.3

  reply	other threads:[~2015-12-03 14:36 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07  3:40 [PATCH/RFC] C++ FE: expression ranges (work in progress) David Malcolm
2015-11-15  4:43 ` [PATCH/RFC] C++ FE: expression ranges (v2) David Malcolm
2015-11-19 20:46   ` Jason Merrill
2015-11-21  8:22     ` Jason Merrill
2015-11-21  8:22       ` Jakub Jelinek
2015-11-23 10:02         ` Richard Biener
2015-11-23 16:58           ` David Malcolm
2015-11-23 17:08             ` Jakub Jelinek
2015-11-23 17:09               ` Marek Polacek
2015-11-23 19:45                 ` Jason Merrill
2015-11-24  9:42                   ` Richard Biener
2015-11-24 11:08                     ` David Malcolm
2015-11-24 11:50                       ` Richard Biener
2015-11-24 12:15                       ` Marek Polacek
2015-11-25 20:32       ` [PATCH/RFC 0/2] C++ FE: expression ranges (v3) David Malcolm
2015-11-25 20:32         ` [PATCH 1/2] RFC: C++: attempt to provide location_t in more places David Malcolm
2015-11-25 21:33           ` Jason Merrill
2015-12-03 14:36             ` David Malcolm [this message]
2015-12-03 14:36               ` [PATCH 04/10] Fix g++.dg/template/crash55.C David Malcolm
2015-12-03 14:37               ` [PATCH 01/10] C++ FE: expression ranges v4 David Malcolm
2015-12-04 17:10                 ` Jason Merrill
2015-12-04 18:13                   ` David Malcolm
2015-12-03 14:37               ` [PATCH 07/10] Fix g++.dg/template/ref3.C David Malcolm
2015-12-03 20:38                 ` Jason Merrill
2015-12-03 22:08                   ` David Malcolm
2015-12-04 16:01                     ` Jason Merrill
2015-12-04 16:45                       ` [PATCH] Add XFAIL to g++.dg/template/ref3.C (PR c++/68699) David Malcolm
2015-12-04 17:09                         ` Jason Merrill
2015-12-03 14:37               ` [PATCH 10/10] Fix g++.dg/warn/Wconversion-real-integer2.C David Malcolm
2015-12-03 14:37               ` [PATCH 03/10] Fix g++.dg/gomp/loop-1.C David Malcolm
2015-12-03 14:37               ` [PATCH 02/10] Fix g++.dg/cpp0x/nsdmi-template14.C David Malcolm
2015-12-03 20:33                 ` Jason Merrill
2015-12-03 21:43                   ` David Malcolm
2015-12-03 22:17                     ` Jason Merrill
2015-12-04 14:22                       ` [PATCH 02/10 v2] Fix g++.dg/cpp0x/nsdmi-template14.C (v2) David Malcolm
2015-12-03 14:37               ` [PATCH 09/10] Fix g++.dg/warn/pr35635.C David Malcolm
2015-12-03 14:37               ` [PATCH 05/10] Fix location of dg-error within g++.dg/template/pr64100.C David Malcolm
2015-12-03 14:37               ` [PATCH 08/10] Fix g++.dg/ubsan/pr63956.C David Malcolm
2015-12-03 14:53               ` [PATCH 06/10] Fix g++.dg/template/pseudodtor3.C David Malcolm
2015-11-25 20:38         ` [PATCH 2/2] RFC: C++ FE: expression ranges (work in progress) v3 David Malcolm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449154548-43964-1-git-send-email-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).