Closed Bug 830315 Opened 7 years ago Closed 7 years ago
_FINAL and MOZ _DELETE cause a warning in clang in C++98 mode
warning: deleted function definitions are a C++11 extension [-Wc++11-extensions] warning: 'final' keyword is a C++11 extension [-Wc++11-extensions] Apparently, __has_extension(cxx_deleted_functions) and __has_extension(cxx_override_control) are still true when __cplusplus < 201103L.
Comment on attachment 701774 [details] [diff] [review] Don't enable MOZ_FINAL and MOZ_DELETE on clang unless compiling as C++11 Review of attachment 701774 [details] [diff] [review]: ----------------------------------------------------------------- Odd. We compile SpiderMonkey as C++98, and use override all the time there, so I'm not sure why I've never seen these warnings there. Oh well, these warnings obviously manifest on a test program, so this is the right thing to do for now. I'd hoped __extension__ override or __extension__(override) would work to silence the warning and give override semantics, but no dice for now. Maybe we'll get it in some future version of clang; I filed http://llvm.org/bugs/show_bug.cgi?id=14953 on that.
Attachment #701774 - Flags: review?(jwalden+bmo) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
This was backed out in bug 831633. https://hg.mozilla.org/mozilla-central/rev/88fc571a9e9e
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
It'd be _really_ nice to get this resolved. This spews out a huge number of warnings, and if you build at a terminal, the combination of clang's colorized output and the interleaving caused by parallel builds makes my terminal program repeatedly bring up print dialogs. Sometimes it also gets the terminal in an unusable state.
You shouldn't actually be seeing these particular warnings, as mentioned in bug 831633. They should only appear for HOST_C*SRCS files, and we don't build that many.
I assume you're going to add the relevant warning flags to HOST_*FLAGS, right? I can't think of a reason why we should have different flags for host versus target here.
I agree that I shouldn't be seeing them. =) I see a lot of them, though, on a clean build (OS X 10.8). IIRC the JS engine is the primary source of them.
I don't see this happening anymore.
Status: REOPENED → RESOLVED
Closed: 7 years ago → 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.