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