This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47940] warn about calls to a pure virtual from a constructor/destructor
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Mar 2011 12:19:43 +0000
- Subject: [Bug c++/47940] warn about calls to a pure virtual from a constructor/destructor
- Auto-submitted: auto-generated
- References: <bug-47940-4@http.gcc.gnu.org/bugzilla/>
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.