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++/5645] gcc warns that pure virtual class not explicitly initialized



------- Comment #7 from jwakely dot gcc at gmail dot com  2007-11-14 13:38 -------
Isn't this warning simply bogus?  In other contexts if a default constructor is
available it will be used without warning, whether explicitly used or not.

e.g.
non-virtual bases in constructor initializer lists
data members in constructor initializer lists
"new T" vs "new T()"
"T t;" vs "T t = T();"

This warning seems to be an attempt to enforce someone's personal preference,
rather than any concerns about correctness.  As shown by comment 9 on bug
11159, in some cases it's not even possible to do what the warning says you
"should" do.


-- 

jwakely dot gcc at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jwakely dot gcc at gmail dot
                   |                            |com


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


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