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++/47940] warn about calls to a pure virtual from a constructor/destructor


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
            Summary|can call a pure virtual     |warn about calls to a pure
                   |from a                      |virtual from a
                   |constructor/destructor      |constructor/destructor

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-01 12:19:40 UTC ---
(In reply to comment #2)
> If it was a direct call, there would be a linker error.

Not if the pure virtual has a definition, and not with all compilers.
G++ does warn about that case though.

None of the compilers I tested issued a diagnostic about indirectly making a
virtual call to a pure virtual function.


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