public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/17936] New: [4.0 regression] Instantiation of specialization rejected
Date: Mon, 11 Oct 2004 16:42:00 -0000	[thread overview]
Message-ID: <20041011164254.17936.reichelt@gcc.gnu.org> (raw)

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


             reply	other threads:[~2004-10-11 16:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 16:42 reichelt at gcc dot gnu dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041011164254.17936.reichelt@gcc.gnu.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).