c++/3662: Incorrect warnings with overridden virtual functions in template class
gdr@gcc.gnu.org
gdr@gcc.gnu.org
Sun Aug 12 08:04:00 GMT 2001
Synopsis: Incorrect warnings with overridden virtual functions in template class
Responsible-Changed-From-To: unassigned->gdr
Responsible-Changed-By: gdr
Responsible-Changed-When: Sun Aug 12 08:04:18 2001
Responsible-Changed-Why:
See below.
State-Changed-From-To: open->closed
State-Changed-By: gdr
State-Changed-When: Sun Aug 12 08:04:18 2001
State-Changed-Why:
Well, actually the issue is subtile. In the instantiation
of the base class CList<int>, GCC discovers the declaration of
a virtual function and since every virtual function is used even
if it -appears- unused (a language definition requirement) GCC
proceeds to check semantics restruictions, thus the warning.
Arguably, GCC could use a type-based analysis to discover that
the base class function won't be used and suppress the warning
but I guess that is a feature request.
-- Gaby
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3662&database=gcc
More information about the Gcc-bugs
mailing list