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++/99186] std::tuple compilation error when elements are specializations of template class declared with template < auto E > syntax with E being a enumerator of a enum
Date: Wed, 13 Dec 2023 20:57:28 +0000	[thread overview]
Message-ID: <bug-99186-4-3KERWjEqHy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99186-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from GCC 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:35ba3add7d0a9fc6ce955ba8ad82b0413e86ad7d

commit r14-6520-g35ba3add7d0a9fc6ce955ba8ad82b0413e86ad7d
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Dec 13 15:55:14 2023 -0500

    c++: unifying constants vs their type [PR99186, PR104867]

    When unifying constants we need to treat constants of different types
    but same value as different in light of auto template parameters since
    otherwise e.g. A<1> will unify with A<1u> (where A's template-head is
    template<auto>).  This patch fixes this in a minimal way; it seems we
    could get away with just using template_args_equal here, as we do in the
    default case, or even just cp_tree_equal since the CONVERT_EXPR_P loop
    seems to be dead code, but that's a simplification we could consider
    during next stage 1.

            PR c++/99186
            PR c++/104867

    gcc/cp/ChangeLog:

            * pt.cc (unify) <case INTEGER_CST>: Compare types as well.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/nontype-auto23.C: New test.
            * g++.dg/cpp1z/nontype-auto24.C: New test.

  parent reply	other threads:[~2023-12-13 20:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-21  1:52 [Bug c++/99186] New: " huili80 at gmail dot com
2021-02-22 16:44 ` [Bug c++/99186] " m.cencora at gmail dot com
2021-08-12 21:33 ` pinskia at gcc dot gnu.org
2021-12-08 14:13 ` marxin at gcc dot gnu.org
2021-12-08 15:38 ` redi at gcc dot gnu.org
2021-12-08 15:49 ` redi at gcc dot gnu.org
2021-12-08 15:53 ` redi at gcc dot gnu.org
2023-12-13 20:57 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-16 17:15 ` ppalka 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-99186-4-3KERWjEqHy@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).