Bug 219320 - [WinCairo][Clang] html/canvas/WebGLDrawBuffers.cpp(77,29): error: non-constant-expression cannot be narrowed from type 'WebCore::GraphicsContextGL::(anonymous enum at GraphicsContextGL.h:64:5)' to 'GCGLenum' (aka 'unsigned int') in initializer list
Summary: [WinCairo][Clang] html/canvas/WebGLDrawBuffers.cpp(77,29): error: non-constan...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 219256
Blocks:
  Show dependency treegraph
 
Reported: 2020-11-27 12:27 PST by Fujii Hironori
Modified: 2020-11-27 12:36 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2020-11-27 12:27:30 PST
[WinCairo][Clang] html/canvas/WebGLDrawBuffers.cpp(77,29): error: non-constant-expression cannot be narrowed from type 'WebCore::GraphicsContextGL::(anonymous enum at GraphicsContextGL.h:64:5)' to 'GCGLenum' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]

clang-cl 11 can't compile WinCairo since r270185.

FAILED: Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-950a39b6-27.cpp.obj 
C:\PROGRA~1\LLVM\bin\clang-cl.exe  (...) -c -- WebCore\DerivedSources\unified-sources\UnifiedSource-950a39b6-27.cpp
In file included from WebCore\DerivedSources\unified-sources\UnifiedSource-950a39b6-27.cpp:5:
..\..\Source\WebCore\html/canvas/WebGLDrawBuffers.cpp(77,29): error: non-constant-expression cannot be narrowed from type 'WebCore::GraphicsContextGL::(anonymous enum at ..\..\Source\WebCore\platform\graphics\GraphicsContextGL.h:64:5)' to 'GCGLenum' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
        GCGLenum value[1] { (bufs[0] == GraphicsContextGL::BACK) ? GraphicsContextGL::COLOR_ATTACHMENT0 : GraphicsContextGL::NONE };
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\Source\WebCore\html/canvas/WebGLDrawBuffers.cpp(77,29): note: insert an explicit cast to silence this issue
        GCGLenum value[1] { (bufs[0] == GraphicsContextGL::BACK) ? GraphicsContextGL::COLOR_ATTACHMENT0 : GraphicsContextGL::NONE };
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            static_cast<GCGLenum>(                                                                               )
1 error generated.
Comment 1 Fujii Hironori 2020-11-27 12:35:24 PST
Committed r270204: <https://trac.webkit.org/changeset/270204>
Comment 2 Radar WebKit Bug Importer 2020-11-27 12:36:16 PST
<rdar://problem/71767565>