<div dir="ltr">If they prove to be good cleanup/improvements to the code in general - but we don't try too hard to be -Werror clean on every compiler, mostly just self-hosted clang. The line is fuzzy - if a warning isn't /too/ bad (ie: doesn't require extreme contortions to the code to address the warning) then fixing instances seems ok. If it's unhelpful (eg: a warning has a high false positive rate and/or clang's equivalent warning is more nuanced and avoids the need to touch false positives) we may disable warnings in LLVM. (this doesn't address the issue of warnings in LLVM's public headers - not every downstream consumer of LLVM is going to disable the same set of warnings, so sometimes it's necessary to do some warning cleanup even for undesirable warnings)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 12, 2021 at 9:14 AM Paul C. Anagnostopoulos via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When I build on Windows 7 with Visual Studio, I get various warnings that were ignored until I recently set <br>
<br>
LLVM_ENABLE_WERROR:BOOL=ON<br>
<br>
One example is shown below. Should I take the time to hunt these down and fix them?<br>
<br>
<br>
**********************************************************************<br>
** Visual Studio 2019 Developer Command Prompt v16.8.1<br>
** Copyright (c) 2020 Microsoft Corporation<br>
**********************************************************************<br>
<br>
D:\LLVM\build>build-targets.bat<br>
        1 file(s) copied.<br>
[363/1578] Building CXX object lib\CodeGen\...LLVMGlobalISel.dir\MachineIRBuilder.cpp.obj<br>
FAILED: lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/MachineIRBuilder.cpp.obj<br>
C:\PROGRA~2\MIB055~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx86\x86\cl.exe  /nolog<br>
o /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS<br>
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_FILE_OFFSET_BITS=64 -D_HAS_EXCEPTI<br>
ONS=0 -D_LARGEFILE_SOURCE -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE<br>
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib\CodeGen\Global<br>
ISel -IC:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel -Iinclude -IC:\LLVM\llvm-project\l<br>
lvm\include /DWIN32 /D_WINDOWS   /WX /Zc:inline /Zc:__cplusplus /Zc:strictStrings /Oi /Zc:<br>
rvalueCast /bigobj /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd<br>
4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd47<br>
02 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091<br>
 -wd4592 -wd4319 -wd4709 -wd4324 -w14062 -we4238 /MDd /Zi /Ob0 /Od /RTC1  /EHs-c- /GR- -st<br>
d:c++14 /showIncludes /Folib\CodeGen\GlobalISel\CMakeFiles\LLVMGlobalISel.dir\MachineIRBui<br>
lder.cpp.obj /Fdlib\CodeGen\GlobalISel\CMakeFiles\LLVMGlobalISel.dir\LLVMGlobalISel.pdb /F<br>
S -c C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp<br>
C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp(657): error C2220: t<br>
he following warning is treated as an error<br>
C:\LLVM\llvm-project\llvm\lib\CodeGen\GlobalISel\MachineIRBuilder.cpp(657): warning C4018:<br>
 '>=': signed/unsigned mismatch<br>
[366/1578] Building CXX object lib\CodeGen\...CMakeFiles\LLVMGlobalISel.dir\Utils.cpp.obj<br>
ninja: build stopped: subcommand failed.<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>