public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39863]  New: variadic templates : wrong error "mismatched argument pack lengths"
@ 2009-04-23 12:22 sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:51 ` [Bug c++/39863] " sylvain dot pion at sophia dot inria dot fr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2009-04-23 12:22 UTC (permalink / raw)
  To: gcc-bugs

The following code :

======================================
template <typename... T>
struct A {};

template <typename T, typename U>
struct S {};

template <typename... T, typename... U>
A< S<T, U>... > f(U... u)
{ return A< S<T, U>... >(); }

int main()
{
  f<int>(0.0);
}
============================================

compiled with g++ -std=c++0x on today's trunk, produces :

test_variadic_2.cpp: In function 'int main()':
test_variadic_2.cpp:13: error: mismatched argument pack lengths while expanding
'S<T, U>'
test_variadic_2.cpp:13: error: no matching function for call to 'f(double)'


I believe this is a bug, and the code should be accepted.


-- 
           Summary: variadic templates : wrong error "mismatched argument
                    pack lengths"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sylvain dot pion at sophia dot inria dot fr
  GCC host triplet: i386-apple-darwin9.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
@ 2009-10-05 21:51 ` sylvain dot pion at sophia dot inria dot fr
  2009-10-05 22:22 ` paolo dot carlini at oracle dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2009-10-05 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from sylvain dot pion at sophia dot inria dot fr  2009-10-05 21:51 -------
Same situation as of today's trunk.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:51 ` [Bug c++/39863] " sylvain dot pion at sophia dot inria dot fr
@ 2009-10-05 22:22 ` paolo dot carlini at oracle dot com
  2009-10-07 17:55 ` [Bug c++/39863] [c++0x] " jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-10-05 22:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2009-10-05 22:22 -------
Let's CC Jason...


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] [c++0x] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
  2009-10-05 21:51 ` [Bug c++/39863] " sylvain dot pion at sophia dot inria dot fr
  2009-10-05 22:22 ` paolo dot carlini at oracle dot com
@ 2009-10-07 17:55 ` jason at gcc dot gnu dot org
  2009-10-07 18:57 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-07 17:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-10-07 17:55:08
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] [c++0x] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
                   ` (2 preceding siblings ...)
  2009-10-07 17:55 ` [Bug c++/39863] [c++0x] " jason at gcc dot gnu dot org
@ 2009-10-07 18:57 ` jason at gcc dot gnu dot org
  2009-10-07 19:32 ` jason at gcc dot gnu dot org
  2009-10-07 19:32 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-07 18:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2009-10-07 18:56 -------
Subject: Bug 39863

Author: jason
Date: Wed Oct  7 18:56:39 2009
New Revision: 152537

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152537
Log:
        PR c++/39863
        * pt.c (tsubst_pack_expansion): Don't do anything now if we
        have incomplete packs of different lengths.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic95.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] [c++0x] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
                   ` (4 preceding siblings ...)
  2009-10-07 19:32 ` jason at gcc dot gnu dot org
@ 2009-10-07 19:32 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-07 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-10-07 19:32 -------
Subject: Bug 39863

Author: jason
Date: Wed Oct  7 19:31:56 2009
New Revision: 152538

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152538
Log:
        PR c++/39863
        * pt.c (tsubst_pack_expansion): Don't do anything now if we
        have incomplete packs of different lengths.

        PR c++/41038
        * tree.c (build_qualified_name): Call convert_from_reference.

        * pt.c (register_specialization): Push DECL_SOURCE_LOCATION to the
        clones.

        * decl.c (grok_special_member_properties): Only adjust
        TYPE_HAS_COMPLEX_* if the function is defaulted in the class body.
        (cp_finish_decl): Push DECL_DELETED_FN/DECL_DEFAULTED_FN to the
        clones.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
      - copied unchanged from r152373,
trunk/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/cpp0x/variadic95.C
      - copied unchanged from r152537,
trunk/gcc/testsuite/g++.dg/cpp0x/variadic95.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/scope3.C
      - copied unchanged from r152537,
trunk/gcc/testsuite/g++.dg/template/scope3.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/decl.c
    branches/gcc-4_4-branch/gcc/cp/pt.c
    branches/gcc-4_4-branch/gcc/cp/tree.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

* [Bug c++/39863] [c++0x] variadic templates : wrong error "mismatched argument pack lengths"
  2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
                   ` (3 preceding siblings ...)
  2009-10-07 18:57 ` jason at gcc dot gnu dot org
@ 2009-10-07 19:32 ` jason at gcc dot gnu dot org
  2009-10-07 19:32 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-07 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2009-10-07 19:32 -------
Fixed for 4.4.2 and 4.5.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39863


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

end of thread, other threads:[~2009-10-07 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 12:22 [Bug c++/39863] New: variadic templates : wrong error "mismatched argument pack lengths" sylvain dot pion at sophia dot inria dot fr
2009-10-05 21:51 ` [Bug c++/39863] " sylvain dot pion at sophia dot inria dot fr
2009-10-05 22:22 ` paolo dot carlini at oracle dot com
2009-10-07 17:55 ` [Bug c++/39863] [c++0x] " jason at gcc dot gnu dot org
2009-10-07 18:57 ` jason at gcc dot gnu dot org
2009-10-07 19:32 ` jason at gcc dot gnu dot org
2009-10-07 19:32 ` jason at gcc dot gnu dot 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).