Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Error from clang: integer value is outside the valid range of values (-Wenum-constexpr-conversion) #4467

Closed
12101111 opened this issue Nov 16, 2024 · 1 comment · Fixed by #4468

Comments

@12101111
Copy link

  • System: Gentoo Linux amd64
  • Compiler: clang++ 19.1.3
  • dxvk version: 2.5 (2.4.1 don't have this error)
  • mingw64 runtime version: 12.0.0
$ i686-w64-mingw32-g++ -v
clang version 19.1.3+libcxx
Target: i686-w64-windows-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/19/bin
Configuration file: /etc/clang/cross/i686-w64-mingw32.cfg
System configuration file directory: /etc/clang
i686-w64-mingw32-g++ -Isrc/d3d11/d3d11.dll.p -Isrc/d3d11 -I../dxvk-2.5/src/d3d11 -I../dxvk-2.5/include -I../dxvk-2.5/include/vulkan/include -I../dxvk-2.5/include/spirv/include -fdiagnostics-color=always -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENI
NG_MODE_FAST -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c++17 -msse -msse2 -msse3 -mfpmath=sse -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-unused-parameter -Wno-cast-function-type -Wno-unused-private-field -Wno-mic
rosoft-exception-spec -Wno-extern-c-compat -Wno-unused-const-variable -Wno-missing-braces -DNOMINMAX -D_WIN32_WINNT=0xa00 -DDXVK_WSI_WIN32 -march=znver4 -mtune=znver4 -O3 -pipe -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-plt
-mno-avx -MD -MQ src/d3d11/d3d11.dll.p/d3d11_device.cpp.obj -MF src/d3d11/d3d11.dll.p/d3d11_device.cpp.obj.d -o src/d3d11/d3d11.dll.p/d3d11_device.cpp.obj -c ../dxvk-2.5/src/d3d11/d3d11_device.cpp
In file included from ../dxvk-2.5/src/d3d11/d3d11_device.cpp:4:
In file included from ../dxvk-2.5/src/d3d11/../dxgi/dxgi_monitor.h:6:
In file included from ../dxvk-2.5/src/d3d11/../dxgi/dxgi_interfaces.h:9:
In file included from ../dxvk-2.5/src/d3d11/../dxgi/dxgi_format.h:5:
In file included from ../dxvk-2.5/src/d3d11/../dxgi/../dxvk/dxvk_device.h:4:
In file included from ../dxvk-2.5/src/d3d11/../dxgi/../dxvk/dxvk_buffer.h:9:
../dxvk-2.5/src/d3d11/../dxgi/../dxvk/dxvk_memory.h:78:3: warning: 'DxvkMemoryChunk' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
   78 |   struct DxvkMemoryChunk {
      |   ^
../dxvk-2.5/src/d3d11/../dxgi/../dxvk/dxvk_memory.h:16:3: note: did you mean struct here?
   16 |   class DxvkMemoryChunk;
      |   ^~~~~
      |   struct
In file included from ../dxvk-2.5/src/d3d11/d3d11_device.cpp:13:
In file included from ../dxvk-2.5/src/d3d11/d3d11_context_def.h:3:
In file included from ../dxvk-2.5/src/d3d11/d3d11_cmdlist.h:5:
In file included from ../dxvk-2.5/src/d3d11/d3d11_context.h:21:
../dxvk-2.5/src/d3d11/d3d11_texture.h:88:54: error: integer value 4294967295 is outside the valid range of values [0, 7] for the enumeration type 'D3D11_MAP' [-Wenum-constexpr-conversion]
   88 |     static constexpr D3D11_MAP UnmappedSubresource = D3D11_MAP(-1u);
      |                                                      ^
1 warning and 1 error generated.
@doitsujin
Copy link
Owner

sigh... there's no reason why this should be an error but i guess fun isn't allowed and we just have to manually cast every single thing to u32 instead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants