Hundreds of -Wdelete-non-virtual-dtor warnings

RESOLVED FIXED in mozilla21

Status

()

P4
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: cpeterson, Assigned: cpeterson)

Tracking

({regression})

unspecified
mozilla21
x86
Mac OS X
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

6 years ago
Created attachment 703152 [details]
Wdelete-non-virtual-dtor-warnings.txt

Yesterday, I only saw a couple -Wdelete-non-virtual-dtor warnings when building Firefox for Android or Mac. Today, I see over 700:

content/base/src/EventSource.cpp:549:1 [-Wdelete-non-virtual-dtor] delete called on 'mozilla::dom::AsyncVerifyRedirectCallbackFwr' that has virtual functions but non-virtual destructor
...

I believe the regression is in this pushlog range:

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=43391698ce5e&tochange=a4b246fb54c1
None of the patches in that range looks like an obvious culprit to me.  cpeterson, can you bisect?
(Assignee)

Comment 2

6 years ago
glandium, these warnings are a regression from disabling MOZ_FINAL in bug 830315.

Can we fix bug 830315's warnings with something like -Wno-c++11-extensions? If clang supports `final` in pre-C++11 code, why not take advantage of it?
Blocks: 830315

Comment 3

6 years ago
Yeah, -Wno-c++0x-extensions and undoing the changes in bug 830315 is probably the best thing to do here.  That, or getting everything compiling as C++11, but that's kind of scope-creepy.  :-)  Still something we should do eventually.
(Assignee)

Comment 4

6 years ago
Created attachment 706278 [details] [diff] [review]
allow-clang-c++11.patch

waldo: this patch just backs out the change from bug 830315 that restricted clang's MOZ_FINAL and MOZ_DELETE to pre-C++11.

glandium: In which files did you the C++11 extension warnings in bug 830315? I see that configure.in and js/src/configure.in already add -Wno-c++0x-extensions to clang's CXXFLAGS:

https://hg.mozilla.org/mozilla-central/file/a207f33adc1a/configure.in#l1518

(I'm building on Mac OS X with Apple's clang 4.1.)
Attachment #706278 - Flags: review?(jwalden+bmo)
Attachment #706278 - Flags: feedback?(mh+mozilla)

Comment 5

6 years ago
Comment on attachment 706278 [details] [diff] [review]
allow-clang-c++11.patch

Review of attachment 706278 [details] [diff] [review]:
-----------------------------------------------------------------

...hum, that's right, we do have that commandline flag.  I'd forgotten about that.  So, yeah, why were you seeing any warnings here, glandium?
Attachment #706278 - Flags: review?(jwalden+bmo) → review+
Because the warning is:
  warning: deleted function definitions are a C++11 extension [-Wc++11-extensions]

Note it's -Wc++11-extensions, not -Wc++0x-extensions
Attachment #706278 - Flags: feedback?(mh+mozilla)
Ah no, it's a different issue, it's because the warning flags are not given to HOST_CXX.
(Assignee)

Comment 8

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/88fc571a9e9e
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla21
Fixed by backout.
https://hg.mozilla.org/mozilla-central/rev/88fc571a9e9e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.