public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected
@ 2021-05-18 14:53 ppalka at gcc dot gnu.org
  2021-05-18 15:17 ` [Bug c++/100652] Unexpanded " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-05-18 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100652
           Summary: Uexpanded parameter pack in partial specialization of
                    variable template not rejected
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

template <class... Ts> struct A { };
template <class T> inline constexpr bool is_a = false;
template <class... Ts> inline constexpr bool is_a<A<Ts>> = true;

GCC silently accepts the above testcase and doesn't diagnose the unexpanded
parameter pack Ts inside the partial specialization of 'is_a'.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/100652] Unexpanded parameter pack in partial specialization of variable template not rejected
  2021-05-18 14:53 [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected ppalka at gcc dot gnu.org
@ 2021-05-18 15:17 ` mpolacek at gcc dot gnu.org
  2021-11-05 21:06 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-05-18 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid
   Last reconfirmed|                            |2021-05-18
            Summary|Uexpanded parameter pack in |Unexpanded parameter pack
                   |partial specialization of   |in partial specialization
                   |variable template not       |of variable template not
                   |rejected                    |rejected
             Status|UNCONFIRMED                 |NEW
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/100652] Unexpanded parameter pack in partial specialization of variable template not rejected
  2021-05-18 14:53 [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected ppalka at gcc dot gnu.org
  2021-05-18 15:17 ` [Bug c++/100652] Unexpanded " mpolacek at gcc dot gnu.org
@ 2021-11-05 21:06 ` ppalka at gcc dot gnu.org
  2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org
  2021-11-09 14:11 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-11-05 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/100652] Unexpanded parameter pack in partial specialization of variable template not rejected
  2021-05-18 14:53 [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected ppalka at gcc dot gnu.org
  2021-05-18 15:17 ` [Bug c++/100652] Unexpanded " mpolacek at gcc dot gnu.org
  2021-11-05 21:06 ` ppalka at gcc dot gnu.org
@ 2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org
  2021-11-09 14:11 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-09 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:a19f09cb03d7f69377e6d12162e5d6df78a82849

commit r12-5052-ga19f09cb03d7f69377e6d12162e5d6df78a82849
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Nov 9 09:09:12 2021 -0500

    c++: unexpanded pack in var tmpl partial spec [PR100652]

    Here we're failing to spot a bare parameter pack appearing in the argument
    list of a variable template partial specialization because we only look for
    them within the decl's TREE_TYPE, which is sufficient for class templates
    but not for variable templates.

            PR c++/100652

    gcc/cp/ChangeLog:

            * pt.c (push_template_decl): Check for bare parameter packs in
            the argument list of a variable template partial specialization.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/var-templ69.C: New test.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c++/100652] Unexpanded parameter pack in partial specialization of variable template not rejected
  2021-05-18 14:53 [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected ppalka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org
@ 2021-11-09 14:11 ` ppalka at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-11-09 14:11 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |12.0

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 12.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-09 14:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 14:53 [Bug c++/100652] New: Uexpanded parameter pack in partial specialization of variable template not rejected ppalka at gcc dot gnu.org
2021-05-18 15:17 ` [Bug c++/100652] Unexpanded " mpolacek at gcc dot gnu.org
2021-11-05 21:06 ` ppalka at gcc dot gnu.org
2021-11-09 14:11 ` cvs-commit at gcc dot gnu.org
2021-11-09 14:11 ` ppalka at gcc dot gnu.org

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).