public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alexander Monakov <amonakov@ispras.ru>
To: Jason Merrill <jason@redhat.com>
Cc: David Malcolm <dmalcolm@redhat.com>,
	    gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Folding and check_function_arguments
Date: Mon, 29 Oct 2018 19:39:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.20.13.1810292133570.19896@monopod.intra.ispras.ru> (raw)
In-Reply-To: <CADzB+2nJNYfZcViuJHCNYNMNWF7=rdFo-2A2fq3=MdDrwPGD_Q@mail.gmail.com>

On Mon, 29 Oct 2018, Jason Merrill wrote:

> On Mon, Oct 29, 2018 at 7:07 AM Alexander Monakov <amonakov@ispras.ru> wrote:
> > On Thu, 25 Oct 2018, Jason Merrill wrote:
> > > > >
> > > > > Maybe we should remove that in favor of fold_for_warn in
> > > > > check_function_arguments.
> >
> > David, I think your patch also fixes PR 86567.
> >
> > David, Jason, could you comment on doing something similar (using fold_for_warn
> > instead of maybe_constant_value) to solve other issues where generation of new
> > tree uids under maybe_constant_value called in warning context changes code
> > generation, in particular PR 86586?
> 
> I don't see how it would help; this change does the same folding, just
> a bit later.

If David's patch causes GCC to perform that folding only after main compilation
flow has already instantiated templates, that should help: folding for warning
wouldn't try to instantiate anything not already instantiated, and thus wouldn't
cause allocation of new uids, I think?

(I did check that it helps on the std::vector testcase given in the PR)

I see that my question about fold_for_warn doesn't make sense though.

Thanks.
Alexander

  reply	other threads:[~2018-10-29 18:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 14:17 [PATCH 1/2] testsuite: multiline.exp: implement optional target/xfail selector David Malcolm
2018-10-04 14:33 ` [PATCH 2/2] Support string locations for C++ in -Wformat (PR c++/56856) David Malcolm
2018-10-05 17:52   ` Jeff Law
2018-10-08 14:44   ` Jason Merrill
2018-10-08 21:46     ` [PATCH] Folding and check_function_arguments David Malcolm
2018-10-25 19:08       ` Jason Merrill
2018-10-29 12:16         ` Alexander Monakov
2018-10-29 19:26           ` Jason Merrill
2018-10-29 19:39             ` Alexander Monakov [this message]
2018-10-05 17:41 ` [PATCH 1/2] testsuite: multiline.exp: implement optional target/xfail selector Jeff Law

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=alpine.LNX.2.20.13.1810292133570.19896@monopod.intra.ispras.ru \
    --to=amonakov@ispras.ru \
    --cc=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).