public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/86193] [DR455] Partial ordering of non-type template parameters with dependent types
Date: Tue, 26 Apr 2022 01:49:32 +0000	[thread overview]
Message-ID: <bug-86193-4-DZ0NqGbFCR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-86193-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86193

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:288e4c64f6b4806358aabc9b99b2fba72bf04bf6

commit r12-8256-g288e4c64f6b4806358aabc9b99b2fba72bf04bf6
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Apr 25 21:46:56 2022 -0400

    c++: partial ordering with dependent NTTP type [PR105289]

    Here ever since r11-6483-ge2e2f3f2c9400f we're rejecting and crashing
    on (respectively) two testcases that we used to accept in C++17 mode
    since r8-1437-g3da557ec145823.  Both testcases declare a partial
    specialization of a primary template that has an NTTP with dependent
    type, and the validity of these partial specializations is unclear and
    the subject of PR86193 / CWG 455.

    So for now, this minimal patch just aims to fix the crash in the second
    testcase.  During deduction, when checking whether the type of an NTTP
    uses still-undeduced parameters, we were incorrectly substituting into
    the previously substituted type instead of into its original type.

    In passing this patch also downgrades the "not more specialized"
    diagnostic from a permerror to a pedwarn.

            PR c++/105289
            PR c++/86193

    gcc/cp/ChangeLog:

            * pt.cc (process_partial_specialization): Downgrade "partial
            specialization isn't more specialized" diagnostic from permerror
            to an on-by-default pedwarn.
            (unify) <case TEMPLATE_PARM_INDEX>: When substituting into the
            NTTP type a second time, use the original type not the
            substituted type.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/partial-specialization11.C: New test.
            * g++.dg/template/partial-specialization12.C: New test.

  parent reply	other threads:[~2022-04-26  1:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-86193-4@http.gcc.gnu.org/bugzilla/>
2022-04-22 17:03 ` [Bug c++/86193] " ppalka at gcc dot gnu.org
2022-04-26  1:49 ` cvs-commit at gcc dot gnu.org [this message]
2022-04-28 15:39 ` [Bug c++/86193] [DR455] " cvs-commit at gcc dot gnu.org

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=bug-86193-4-DZ0NqGbFCR@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).