-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSVC 2022 17.12.1 configure.py --bootstrap
fails on emhash/hash_table8.hpp
#2531
Comments
These are only warnings, but still we should fix them. @sesse can you have a look? We should also think about using |
The GetProcAddress() stuff is preexisting, right? There are the ones in hash_table8.hpp, but I guess they are just… bogus warnings that we should turn off? |
Something like this? --- a/configure.py
+++ b/configure.py
@@ -340,6 +340,8 @@ if platform.is_msvc():
'/wd4355',
# Disable warnings about ignored typedef in DbgHelp.h
'/wd4091',
+ # Disable warnings about redefined locals in hash_table8.hpp
+ '/wd4456',
'/GR-', # Disable RTTI.
'/Zc:__cplusplus',
# Disable size_t -> int truncation warning. |
The shadow warning exists when using GCC with H:\llvm\ninja>configure.py --bootstrap --platform mingw
bootstrapping ninja...
warning: A compatible version of re2c (>= 0.15.3) was not found; changes to src/*.in.cc will not affect your build.
In file included from .\src\hash_map.h:23,
from .\src\build_log.h:21,
from .\src\build.cc:31:
.\src\third_party/emhash/hash_table8.hpp: In member function 'emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::size_type emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::find_filled_bucket(const KeyT&, uint64_t) const':
.\src\third_party/emhash/hash_table8.hpp:1340:28: warning: declaration of 'slot' shadows a previous local [-Wshadow=compatible-local]
1340 | const auto slot = _index[next_bucket].slot & _mask;
| ^~~~
.\src\third_party/emhash/hash_table8.hpp:1329:20: note: shadowed declaration is here
1329 | const auto slot = _index[bucket].slot & _mask;
| ^~~~
.\src\third_party/emhash/hash_table8.hpp: In member function 'emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::size_type emhash8::HashMap<KeyT, ValueT, HashT, EqT, Allocator, Policy>::find_filled_slot(const K&) const':
.\src\third_party/emhash/hash_table8.hpp:1375:28: warning: declaration of 'slot' shadows a previous local [-Wshadow=compatible-local]
1375 | const auto slot = _index[next_bucket].slot & _mask;
| ^~~~
.\src\third_party/emhash/hash_table8.hpp:1364:20: note: shadowed declaration is here
1364 | const auto slot = _index[bucket].slot & _mask;
| ^~~~ |
These |
Reported these shadow warnings to upstream at ktprime/emhash#42 |
thanks, I have fixed the issues in latest version. |
All GCC and Clang warnings were fixed, can we update |
warning C4456: declaration of 'slot' hides previous local declaration
:ninja/src/third_party/emhash/hash_table8.hpp
Lines 1329 to 1340 in b40052c
ninja/src/third_party/emhash/hash_table8.hpp
Lines 1364 to 1375 in b40052c
full
configure.py --bootstrap --platform msvc
output:other warnings using LLVM
clang-cl
19.1.4.GCC 14.2 warnings:
LLVM mingw 19.1.4 warnings:
The text was updated successfully, but these errors were encountered: