[Webkit-unassigned] [Bug 174986] New: [WTF] Use pragma once

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 31 12:10:05 PDT 2017


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

            Bug ID: 174986
           Summary: [WTF] Use pragma once
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: utatane.tea at gmail.com

WTF is very tricky. These headers are copied to BuildDir/usr/local/include/wtf.
And source files start using it... That causes problems.
Based on how you include headers (I believe this relies on "XXX.h" and <wtf/XXX.h> with different header search paths), the compiler includes the same files twice with difernt paths (Source/WTF/wtf/XXX.h and BuildDir/usr/local/include/wtf/XXX.h).
And it causes compile errors.

The example is wtf/text/StringView.h. When I changed this ifndef guard to pragma once, it causes compile error(https://bugs.webkit.org/show_bug.cgi?id=166676#c5). And I reverted this part.
And we can see similar problems https://bugs.webkit.org/show_bug.cgi?id=164194#c4.

But this tricky problem should be fixed. And we should change WTF headers' ifndef guard to pragma once.

-- 
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/20170731/a357c246/attachment.html>


More information about the webkit-unassigned mailing list