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

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