This is the mail archive of the gcc-bugs@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++/3662: Incorrect warnings with overridden virtual functions in template class


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


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