From mboxrd@z Thu Jan 1 00:00:00 1970 From: gdr@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, gdr@gcc.gnu.org, nobody@gcc.gnu.org, stuart@personalrobots.com Subject: Re: c++/3662: Incorrect warnings with overridden virtual functions in template class Date: Sun, 12 Aug 2001 08:04:00 -0000 Message-id: <20010812150418.30417.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00251.html List-Id: 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, 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