[Webkit-unassigned] [Bug 100617] New: webkit-gtk 1.10.1 fails to build using clang++ -std=c++11 on darwin

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Oct 28 14:26:33 PDT 2012


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

           Summary: webkit-gtk 1.10.1 fails to build using clang++
                    -std=c++11 on darwin
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: jeremyhu at apple.com


webkit-gtk fails to build using clang -stc=c++11 due to -Wc++11-narrowing.  This is an error by default in clang. One can work past it using -Wno-error=c++11-narrowing, but the underlying issues should still be resolved.  

Here are the related warnings I've noticed so far:

:info:build ./Source/JavaScriptCore/runtime/Identifier.h:183:33: warning: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]
:info:build         CharBuffer<T> buf = {s, length}; 
:info:build                                 ^~~~~~
:info:build ./Source/JavaScriptCore/runtime/Identifier.h:50:85: note: in instantiation of function template specialization 'JSC::Identifier::add<unsigned char>' requested here
:info:build         Identifier(JSGlobalData* globalData, const LChar* s, int length) : m_string(add(globalData, s, length)) { }
:info:build                                                                                     ^
:info:build ./Source/JavaScriptCore/runtime/Identifier.h:183:33: note: override this message by inserting an explicit cast
:info:build         CharBuffer<T> buf = {s, length}; 
:info:build                                 ^~~~~~
:info:build                                 static_cast<unsigned int>( )

---

:info:build Source/WTF/wtf/text/AtomicString.cpp:254:31: warning: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]
:info:build     UCharBuffer buffer = { s, length };
:info:build                               ^~~~~~
:info:build Source/WTF/wtf/text/AtomicString.cpp:254:31: note: override this message by inserting an explicit cast
:info:build     UCharBuffer buffer = { s, length };
:info:build                               ^~~~~~
:info:build                               static_cast<unsigned int>( )

---

:info:build Source/WTF/wtf/unicode/UTF8.cpp:279:27: warning: constant expression evaluates to 4194836608 which cannot be narrowed to type 'UChar32' (aka 'int') [-Wc++11-narrowing]
:info:build             0x03C82080UL, 0xFA082080UL, 0x82082080UL };
:info:build                           ^~~~~~~~~~~~
:info:build Source/WTF/wtf/unicode/UTF8.cpp:279:27: note: override this message by inserting an explicit cast
:info:build             0x03C82080UL, 0xFA082080UL, 0x82082080UL };
:info:build                           ^~~~~~~~~~~~
:info:build                           static_cast<UChar32>( )

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list