Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 953436 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-19 / +1 lines)
Line  Link Here
0
-- a/third_party/blink/renderer/build/scripts/gperf.py
0
++ b/third_party/blink/renderer/build/scripts/gperf.py
Lines 28-51 Link Here
28
            stdout=subprocess.PIPE,
28
            stdout=subprocess.PIPE,
29
            universal_newlines=True)
29
            universal_newlines=True)
30
        gperf_output = gperf.communicate(gperf_input)[0]
30
        gperf_output = gperf.communicate(gperf_input)[0]
31
        # Massage gperf output to be more palatable for modern compilers.
32
        # TODO(thakis): Upstream these to gperf so we don't need massaging.
33
        # `register` is deprecated in C++11 and removed in C++17, so remove
34
        # it from gperf's output.
35
        # https://savannah.gnu.org/bugs/index.php?53028
36
        gperf_output = re.sub(r'\bregister ', '', gperf_output)
37
        # -Wimplicit-fallthrough needs an explicit fallthrough statement,
38
        # so replace gperf's /*FALLTHROUGH*/ comment with the statement.
39
        # https://savannah.gnu.org/bugs/index.php?53029
40
        gperf_output = gperf_output.replace('/*FALLTHROUGH*/',
41
                                            '  [[fallthrough]];')
42
        # -Wpointer-to-int-cast warns about casting pointers to smaller ints
43
        # Replace {(int)(long)&(foo), bar} with
44
        # {static_cast<int>(reinterpret_cast<uintptr_t>(&(foo)), bar}
45
        gperf_output = re.sub(
46
            r'\(int\)\(long\)(.*?),',
47
            r'static_cast<int>(reinterpret_cast<uintptr_t>(\1)),',
48
            gperf_output)
49
        script = 'third_party/blink/renderer/build/scripts/gperf.py'
31
        script = 'third_party/blink/renderer/build/scripts/gperf.py'
50
        return '// Generated by %s\n' % script + gperf_output
32
        return '// Generated by %s\n' % script + gperf_output
51
    except OSError:
33
    except OSError:

Return to bug 953436