Skip to content

[MSVC] Compiler build failed on Windows due to narrowing conversion #19891

@uditagarwal97

Description

@uditagarwal97

Describe the bug

C:\PROGRA~1\MICROS~2\2022\PROFES~1\VC\Tools\MSVC\1444~1.35~\bin\Hostx86\x86\cl.exe  /nologo /TP -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 -D_LARGEFILE_SOURCE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\iusers\uagarwal\llvm\build\lib\Object -ID:\iusers\uagarwal\llvm\llvm\lib\Object -ID:\iusers\uagarwal\llvm\build\include -ID:\iusers\uagarwal\llvm\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2  -MD  /EHs-c- /GR- -UNDEBUG -std:c++17 /showIncludes /Folib\Object\CMakeFiles\LLVMObject.dir\SYCLBIN.cpp.obj /Fdlib\Object\CMakeFiles\LLVMObject.dir\LLVMObject.pdb /FS -c D:\iusers\uagarwal\llvm\llvm\lib\Object\SYCLBIN.cpp
$llvm\llvm\lib\Object\SYCLBIN.cpp(58): error C2398: Element '2': conversion from 'uint64_t' to 'size_t' requires a narrowing conversion
$llvm\llvm\lib\Object\SYCLBIN.cpp(354): error C2398: Element '2': conversion from 'const uint64_t' to 'size_t' requires a narrowing conversion
$llvm\llvm\lib\Object\SYCLBIN.cpp(357): error C2398: Element '2': conversion from 'const uint64_t' to 'size_t' requires a narrowing conversion
$llvm\llvm\lib\Object\SYCLBIN.cpp(360): error C2398: Element '2': conversion from 'const uint64_t' to 'size_t' requires a narrowing conversion

DPCPP commit: 5b5fd84
OS: Windows
Host compiler: MSVC

To reproduce

  1. Use VS2022 Developer command prompt
  2. python ./buildbot/configure.py
  3. python ./buildbot/compile.py

Environment

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions