public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected
@ 2004-10-11 16:42 reichelt at gcc dot gnu dot org
  2004-10-11 17:04 ` [Bug c++/17936] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-11 16:42 UTC (permalink / raw)
  To: gcc-bugs

The following code snippet does not compile any more on mainline:

==================================
template<int, int N> struct A
{
    void foo();
};

template<int N> struct A<1, N>
{
    void foo();
};

template<> void A<1, 2>::foo();
==================================

vectors.cc:11: error: prototype for `void A<1, N>::foo() [with int N = 2]' does
not match any in class `A<1, 2>'
vectors.cc:8: error: candidate is: void A<1, N>::foo() [with int N = 2]
vectors.cc:11: error: `void A<1, N>::foo() [with int N = 2]' and `void A<1,
N>::foo() [with int N = 2]' cannot be overloaded
vectors.cc:11: error: prototype for `void A<1, N>::foo() [with int N = 2]' does
not match any in class `A<1, 2>'
vectors.cc:8: error: candidate is: void A<1, N>::foo() [with int N = 2]
vectors.cc:11: error: `void A<1, N>::foo() [with int N = 2]' and `void A<1,
N>::foo() [with int N = 2]' cannot be overloaded

This was caused by Mark's patch
http://gcc.gnu.org/ml/gcc-cvs/2004-10/msg00316.html

Mark, could you please have a look?

-- 
           Summary: [4.0 regression] Instantiation of specialization
                    rejected
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: rejects-valid, monitored
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: bangerth at dealii dot org,gcc-bugs at gcc dot gnu dot
                    org,mark at codesourcery dot com
OtherBugsDependingO 17522
             nThis:


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


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

* [Bug c++/17936] [4.0 regression] Instantiation of specialization rejected
  2004-10-11 16:42 [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected reichelt at gcc dot gnu dot org
@ 2004-10-11 17:04 ` pinskia at gcc dot gnu dot org
  2004-10-11 17:19 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-11 17:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-11 17:04 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-11 17:04:29
               date|                            |
   Target Milestone|---                         |4.0.0


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


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

* [Bug c++/17936] [4.0 regression] Instantiation of specialization rejected
  2004-10-11 16:42 [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected reichelt at gcc dot gnu dot org
  2004-10-11 17:04 ` [Bug c++/17936] " pinskia at gcc dot gnu dot org
@ 2004-10-11 17:19 ` mmitchel at gcc dot gnu dot org
  2004-10-11 22:50 ` [Bug c++/17936] [4.0 regression] Declaration " cvs-commit at gcc dot gnu dot org
  2004-10-11 22:51 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-11 17:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/17936] [4.0 regression] Declaration of specialization rejected
  2004-10-11 16:42 [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected reichelt at gcc dot gnu dot org
  2004-10-11 17:04 ` [Bug c++/17936] " pinskia at gcc dot gnu dot org
  2004-10-11 17:19 ` mmitchel at gcc dot gnu dot org
@ 2004-10-11 22:50 ` cvs-commit at gcc dot gnu dot org
  2004-10-11 22:51 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-11 22:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-11 22:50 -------
Subject: Bug 17936

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-10-11 22:50:00

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog cp-tree.h pt.c 
Added files:
	gcc/testsuite/g++.dg/template: spec18.C 

Log message:
	PR c++/17936
	* cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
	* pt.c (optimize_specialization_lookup_p): Do not optimize lookups
	for members of partial or explicit specializations.
	
	PR c++/17936
	* g++.dg/template/spec18.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4437&r2=1.4438
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/spec18.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4425&r2=1.4426
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1061&r2=1.1062
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.934&r2=1.935



-- 


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


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

* [Bug c++/17936] [4.0 regression] Declaration of specialization rejected
  2004-10-11 16:42 [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-10-11 22:50 ` [Bug c++/17936] [4.0 regression] Declaration " cvs-commit at gcc dot gnu dot org
@ 2004-10-11 22:51 ` mmitchel at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-10-11 22:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-10-11 22:51 -------
Fixed in GCC 4.0.

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


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


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

end of thread, other threads:[~2004-10-11 22:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-11 16:42 [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected reichelt at gcc dot gnu dot org
2004-10-11 17:04 ` [Bug c++/17936] " pinskia at gcc dot gnu dot org
2004-10-11 17:19 ` mmitchel at gcc dot gnu dot org
2004-10-11 22:50 ` [Bug c++/17936] [4.0 regression] Declaration " cvs-commit at gcc dot gnu dot org
2004-10-11 22:51 ` mmitchel 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).