[Webkit-unassigned] [Bug 195920] New: Build cleanly with GCC 9

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 18 16:28:36 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=195920

            Bug ID: 195920
           Summary: Build cleanly with GCC 9
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at igalia.com
                CC: bugs-noreply at webkitgtk.org

WebKit triggers three new GCC 9 warnings:

-Wdeprecated-copy, implied by -Wextra, warns about the C++11 deprecation of implicitly declared copy constructor and assignment operator if one of them is user-provided. -Wdeprecated-copy-dtor also warns if the destructor is user-provided, as specified in C++11.

Solution is to either add a copy constructor or copy assignment operator, if required, or else remove one if it is redundant. This is the highest regression potential; I messed up ScriptDisallowedScope in an earlier version of this patch.

-Wredundant-move, implied by -Wextra, warns about redundant calls to std::move.
-Wpessimizing-move, implied by -Wall, warns when a call to std::move prevents copy elision.

These account for most of this patch. Solution is to just remove the bad WTFMove().

-Wclass-memaccess has also been enhanced to catch a few cases that GCC 8 didn't. These are solved by casting nontrivial types to void* before using memcpy. (Of course, it would be safer to not use memcpy on nontrivial types, but that's too complex for this patch.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190318/31363575/attachment.html>


More information about the webkit-unassigned mailing list