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]
Other format: [Raw text]

[Bug c++/31397] Useful compiler warning missing (virtual functions in derived classes used without 'virtual')



------- Comment #6 from Thomas dot Lange at sun dot com  2009-07-13 11:56 -------
(In reply to comment #5)

No. I do mean overloaded!

It might be nice to have a warning for overloading virtual functions of base
classes as well. But my point is that the compiler should help to enforce that
every virtual function has the 'virtual' keyword set in its declaration.
Thus effectively removing those implicit virtual functions that are allowed in
C++. 
The goal is: Either a function should be explicitly declared virtual in its
declaration or not be virtual at all.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31397


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