This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: Diagnose use of abstract class in function prototype
- To: Jason Merrill <jason_merrill at redhat dot com>
- Subject: Re: C++ PATCH: Diagnose use of abstract class in function prototype
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 10 Apr 2001 20:01:51 +0200
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Organization: CodeSourcery, LLC
- References: <fly9t92f8z.fsf@sel.cmla.ens-cachan.fr> <m3lmp8lsb1.fsf@prospero.cambridge.redhat.com>
Jason Merrill <jason_merrill@redhat.com> writes:
| >>>>> "Gabriel" == Gabriel Dos Reis <gdr@codesourcery.com> writes:
|
| > This bug is serious enough to deserve a fix in GCC-3.0.
|
| I disagree; I don't think any missed error that was also missed in 2.95.2
| is serious enough.
Even when we're generating wrong code? In the example I gave, we're
generating an explicit call to X::print instead of using the dynamic
dispatch mechanism which couldn't have found it. That is what prompts
me in the first place to fix it -- it is derived from an error in a
real world program.
| > The patch below tries to fix it. Actually it catches most of similar
| > constructs. However, it misses
|
| > struct Y {
| > virtual void f() = 0;
|
| > template<typename> Z {
| > void g(Y, Z);
| > };
|
| > Z<int> z;
| > };
|
| Why not fix this too, while you're at it?
It is just that I'm missing insights :-)
Maybe you may help me: when I have a TEMPLATE_DECL on the
TYPE_FIELDS, should I go one inspecting whether or not there is any
full specialization?
-- Gaby