This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ PATCH: Diagnose use of abstract class in function prototype


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]