public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/26988] template constructor in template class derived from virtual base can not be specialized Date: Tue, 18 Apr 2006 03:45:00 -0000 [thread overview] Message-ID: <20060418034510.3241.qmail@sourceware.org> (raw) In-Reply-To: <bug-26988-12459@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from bangerth at dealii dot org 2006-04-18 03:45 ------- Confirmed, though this doesn't seem to have anything to do with PR 9050. Here's a shorter testcase: -------------- struct B{}; struct Bar : virtual B { template <typename T> Bar( T const& cast ); }; template <> Bar::Bar( int const & cast ) {} template <typename T> struct Foo : virtual B { template <typename T1> Foo( T1 const& cast ); }; template< > template< > Foo< char >::Foo( int const & cast ) {} --------------------- g/x> /home/bangerth/bin/gcc-4.1-pre/bin/c++ -c x.cc x.cc:7: error: template-id ‘Bar<>’ for ‘Bar::Bar(const int&)’ does not match any template declaration x.cc:7: error: invalid function declaration x.cc:15: error: template-id ‘Foo<>’ for ‘Foo<char>::Foo(const int&)’ does not match any template declaration x.cc:15: error: invalid function declaration The thing that makes me think that this has nothing to do with 9050 is that if the inheritance is made non-virtual, then the bug goes away. That's certainly odd behavior -- this is a bug in semantic analysis, not in the parser! This used to work in 2.95, so is a regression of rejects-valid kind. W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |rejects-valid Known to fail| |3.3.5 3.4.4 4.0.1 4.1.0 Known to work| |2.95 Priority|P3 |P2 Last reconfirmed|0000-00-00 00:00:00 |2006-04-18 03:45:10 date| | Target Milestone|--- |4.1.1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
next prev parent reply other threads:[~2006-04-18 3:45 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-04-02 15:05 [Bug c++/26988] New: template function " nuttygraphics at yahoo dot com 2006-04-02 16:21 ` [Bug c++/26988] template constructor " pinskia at gcc dot gnu dot org 2006-04-18 3:45 ` bangerth at dealii dot org [this message] 2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org 2006-09-17 19:34 ` [Bug c++/26988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org 2007-01-11 4:05 ` [Bug c++/26988] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org 2007-02-03 16:45 ` gdr at gcc dot gnu dot org 2007-02-03 20:28 ` pinskia at gcc dot gnu dot org 2007-02-11 20:15 ` mmitchel at gcc dot gnu dot org 2007-02-11 21:41 ` mmitchel at gcc dot gnu dot org 2007-02-11 21:41 ` [Bug c++/26988] [4.0/4.1 " mmitchel at gcc dot gnu dot org 2007-02-14 9:10 ` mmitchel at gcc dot gnu dot org 2008-07-04 15:27 ` [Bug c++/26988] [4.1 " jsm28 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=20060418034510.3241.qmail@sourceware.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: linkBe 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).