From: Marek Polacek <polacek@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: "Martin Liška" <mliska@suse.cz>, "GCC Patches" <gcc-patches@gcc.gnu.org>
Subject: Re: PSA: Default C++ dialect is now C++17
Date: Mon, 14 Sep 2020 21:17:42 -0400 [thread overview]
Message-ID: <20200915011742.GO5926@redhat.com> (raw)
In-Reply-To: <CADzB+2=T6XmPwQD_gkgMcrCwthB_WydEAfpjOJEdXwDRUZGa-w@mail.gmail.com>
On Mon, Sep 14, 2020 at 11:13:18AM -0400, Jason Merrill via Gcc-patches wrote:
> On Mon, Jun 29, 2020 at 1:25 PM Martin Liška <mliska@suse.cz> wrote:
> >
> > On 6/29/20 4:57 PM, Marek Polacek wrote:
> > > On Mon, Jun 29, 2020 at 09:51:57AM +0200, Martin Liška wrote:
> > >> On 6/26/20 9:34 PM, Marek Polacek via Gcc-patches wrote:
> > >>> As discussed last month:
> > >>> <https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545879.html>
> > >>> it's time to change the C++ default to gnu++17. I've committed the patch after
> > >>> testing x86_64-pc-linux-gnu and powerpc64le-unknown-linux-gnu. Brace yourselves!
> > >>>
> > >>> Marek
> > >>>
> > >>
> > >> Just a small note that 510.parest_r SPEC 2017 benchmark can't be built now
> > >> with default changed to -std=c++17. The spec config needs to be adjusted.
> > >
> > > Interesting, do you know why? Does it use the register keyword?
> >
> > Apparently it needs -fno-new-ttp-matching for successful compilation.
> > There's a reduced test-case I made:
> >
> > cat fe.ii
> > template <int, int> class FiniteElement;
> > template <int, int> class DoFHandler;
> > class FETools {
> > template <int dim, class InVector, class OutVector, int spacedim>
> > void back_interpolate(const DoFHandler<dim, spacedim> &, const InVector &,
> > const FiniteElement<dim, spacedim> &, OutVector &);
> > template <int dim, template <int> class DH, class InVector, class OutVector,
> > int spacedim>
> > void back_interpolate(const DH<dim> &, InVector,
> > const FiniteElement<dim, spacedim> &, OutVector);
> > };
> > template <int dim, int = dim> class DoFHandler;
> > template <int dim, int = dim> class FiniteElement;
> > template <int dim, class InVector, class OutVector, int spacedim>
> > void FETools::back_interpolate(const DoFHandler<dim, spacedim> &,
> > const InVector &,
> > const FiniteElement<dim, spacedim> &,
> > OutVector &) {}
> > template void FETools::back_interpolate(const DoFHandler<3> &, const float &,
> > const FiniteElement<3> &, float &);
>
> Hmm, looks like I never sent this.
>
> Further reduced:
>
> template <int N, int M = N> class A;
> template <int N, int M> void fn(A<N, M> &) {}
> template <int N, template <int> class TT> void fn(TT<N> &);
> template void fn(A<3> &);
>
> This breaks due to the C++17 changes to template template parameters
> causing A to now be considered a valid argument for TT; with that
> change both function templates are valid candidates, and neither is
> more specialized than the other, so it's ambiguous.
>
> There are still some open core issues around these changes.
Thanks. I just pushed a patch to introduce GCC 11 porting_to:
<https://gcc.gnu.org/gcc-11/porting_to.html> and documented this change.
Let me know if you have any comments.
Marek
next prev parent reply other threads:[~2020-09-15 1:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 19:34 Marek Polacek
2020-06-26 19:58 ` Marek Polacek
2020-06-29 7:51 ` Martin Liška
2020-06-29 14:57 ` Marek Polacek
2020-06-29 17:24 ` Martin Liška
2020-09-14 15:13 ` Jason Merrill
2020-09-15 1:17 ` Marek Polacek [this message]
2020-09-15 15:36 ` Jeff Law
2020-06-29 18:11 ` Martin Liška
2020-06-30 9:16 ` Tamar Christina
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=20200915011742.GO5926@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=mliska@suse.cz \
/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).