public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34052]  New: [4.3 regression] Trouble with variadic templates as template-template parameter
@ 2007-11-10 17:36 reichelt at gcc dot gnu dot org
  2007-11-10 17:37 ` [Bug c++/34052] " reichelt at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-10 17:36 UTC (permalink / raw)
  To: gcc-bugs

The following code snippet is IMHO wrongly accepted on mainline:

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

A slightly modified example ICE's:

=====================================================================
template<template<typename... T, typename = T> class U> struct A
{
  template<int> U<int> foo();
};
=====================================================================

bug.cc:3: internal compiler error: in tsubst, at cp/pt.c:8466
Please submit a full bug report, [etc.]


-- 
           Summary: [4.3 regression] Trouble with variadic templates as
                    template-template parameter
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, accepts-invalid, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
@ 2007-11-10 17:37 ` reichelt at gcc dot gnu dot org
  2007-11-19  4:17 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-10 17:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
  2007-11-10 17:37 ` [Bug c++/34052] " reichelt at gcc dot gnu dot org
@ 2007-11-19  4:17 ` pinskia at gcc dot gnu dot org
  2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-19  4:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-11-19 04:17 -------
Confirmed, the regression part is an error-recovery issue.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |error-recovery
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-19 04:17:13
               date|                            |


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
  2007-11-10 17:37 ` [Bug c++/34052] " reichelt at gcc dot gnu dot org
  2007-11-19  4:17 ` pinskia at gcc dot gnu dot org
@ 2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
  2007-12-02 20:58 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-11-27  5:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
@ 2007-12-02 20:58 ` pinskia at gcc dot gnu dot org
  2007-12-20 21:01 ` dgregor at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-02 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-12-02 20:58 -------
 Mark, this is really only an error recovery regression. Can you relook at the
current priority?

Thanks,
Andrew Pinski

t1.cc:2: error: ISO C++ does not include variadic templates
t1.cc:4: internal compiler error: tree check: accessed elt 3 of tree_vec with 2
elts in coerce_template_parms, at cp/pt.c:5225
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-12-02 20:58 ` pinskia at gcc dot gnu dot org
@ 2007-12-20 21:01 ` dgregor at gcc dot gnu dot org
  2008-01-03 16:25 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-12-20 21:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-11-19 04:17:13         |2007-12-20 21:00:48
               date|                            |


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-12-20 21:01 ` dgregor at gcc dot gnu dot org
@ 2008-01-03 16:25 ` rguenth at gcc dot gnu dot org
  2008-01-03 17:19 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-03 16:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-01-03 16:01 -------
I agree, these sort of bugs should be P4 as a user will only see

t.C:1: error: ISO C++ does not include variadic templates
t.C:3: confused by earlier errors, bailing out


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-01-03 16:25 ` rguenth at gcc dot gnu dot org
@ 2008-01-03 17:19 ` mmitchel at gcc dot gnu dot org
  2008-01-11 15:58 ` dgregor at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-01-03 17:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2008-01-03 17:02 -------
A user that has turned on C++0x will of course not see the message that ISO C++
doesn't allow variadic templates.  Our NEWS file is going to say that we have a
great new feature: variadic templates.  Given that, it's a feature just like
any other.  I'd like to see new features held to a high quality standard.

I see the argument that this isn't a regression, but if I'm a user, and I read
about the new feature, and I try it out, and things break, that seems bad.  So,
I'd prefer to leave it P2, but I agree that it's sort of a "low P2".


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-01-03 17:19 ` mmitchel at gcc dot gnu dot org
@ 2008-01-11 15:58 ` dgregor at gcc dot gnu dot org
  2008-01-12 19:34 ` andreasmeier80 at gmx dot de
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-11 15:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dgregor at gcc dot gnu dot org  2008-01-11 15:24 -------
Amusingly enough (since this is the second time this has happened today), this
problem occurs both with and without variadic templates. The following code is
ill-formed according to C++98, but GCC accepts it:

  template<template<typename T = int, typename U> class C> struct X;

I'm working on a fix for both issues.


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-01-11 15:58 ` dgregor at gcc dot gnu dot org
@ 2008-01-12 19:34 ` andreasmeier80 at gmx dot de
  2008-01-15  1:04 ` dgregor at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: andreasmeier80 at gmx dot de @ 2008-01-12 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from andreasmeier80 at gmx dot de  2008-01-12 19:08 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00491.html


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-01-12 19:34 ` andreasmeier80 at gmx dot de
@ 2008-01-15  1:04 ` dgregor at gcc dot gnu dot org
  2008-01-15 16:33 ` dgregor at gcc dot gnu dot org
  2008-01-15 16:35 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-15  1:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dgregor at gcc dot gnu dot org  2008-01-15 00:12 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00491.html


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-01-15  1:04 ` dgregor at gcc dot gnu dot org
@ 2008-01-15 16:33 ` dgregor at gcc dot gnu dot org
  2008-01-15 16:35 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-15 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dgregor at gcc dot gnu dot org  2008-01-15 16:07 -------
Subject: Bug 34052

Author: dgregor
Date: Tue Jan 15 16:06:48 2008
New Revision: 131543

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131543
Log:
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/34052
       * pt.c (check_default_tmpl_args): Check for parameter packs that
       aren't at the end of a primary template.
       (push_template_decl_real): Remove check for parameter packs that
       aren't at the end of a primary template; that now happens in
       check_default_tmpl_args.
       * semantics.c (finish_template_template_parm): Use
       check_default_tmpl_args to check for errors in the template
       parameter list.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

       PR c++/34052
       * g++.dg/cpp0x/vt-34052.C: New.
       * g++.dg/template/ttp26.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34052.C
    trunk/gcc/testsuite/g++.dg/template/ttp26.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/34052] [4.3 regression] Trouble with variadic templates as template-template parameter
  2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-01-15 16:33 ` dgregor at gcc dot gnu dot org
@ 2008-01-15 16:35 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-15 16:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dgregor at gcc dot gnu dot org  2008-01-15 16:07 -------
Fixed in mainline


-- 

dgregor at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-01-15 16:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-10 17:36 [Bug c++/34052] New: [4.3 regression] Trouble with variadic templates as template-template parameter reichelt at gcc dot gnu dot org
2007-11-10 17:37 ` [Bug c++/34052] " reichelt at gcc dot gnu dot org
2007-11-19  4:17 ` pinskia at gcc dot gnu dot org
2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
2007-12-02 20:58 ` pinskia at gcc dot gnu dot org
2007-12-20 21:01 ` dgregor at gcc dot gnu dot org
2008-01-03 16:25 ` rguenth at gcc dot gnu dot org
2008-01-03 17:19 ` mmitchel at gcc dot gnu dot org
2008-01-11 15:58 ` dgregor at gcc dot gnu dot org
2008-01-12 19:34 ` andreasmeier80 at gmx dot de
2008-01-15  1:04 ` dgregor at gcc dot gnu dot org
2008-01-15 16:33 ` dgregor at gcc dot gnu dot org
2008-01-15 16:35 ` dgregor 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).