Project

General

Profile

Actions

Emulator Issues #11692

closed

Dolphin build failed due to warning C5054 under /std:c++latest(C++20) on MSVC

Added by QuellaZhang over 5 years ago. Updated about 5 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
Yes
Regression start:
Fixed in:
5.0-10850

Description

Dolphin build failed due to warning C5054 under /std:c++latest(C++20) in the development version of Visual C++. Could you help look at this? Thanks in advance! Noted that this issue only found when compiles with unreleased vctoolset, that next release of MSVC will have this behavior.

This is a source issue which will accompany the introduction of [depr.arith.conv.enum]/1 in C++20. The fix would be to either static_cast SI_TYPE_GC or SI_GC_STANDARD to an int or suppress the warning in the build. See source reference: https://github.com/dolphin-emu/dolphin/blob/dd1fc70d703ab399584df6048f2705c3709a4ecc/Source/Core/Core/HW/SI/SI_Device.h#L45

Repro steps:

  1. open VS2017 x64 Native tools command tool
  2. git clone https://github.com/dolphin-emu/dolphin.git D:\Dolphin\src
  3. cd D:\Dolphin
  4. msbuild /t:Dolphin /p:Configuration=Release;Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17134.0 .\src\Source\dolphin-emu.sln /m

Failures:
D:\Dolphin\src\Source\Core\Core\HW\SI\SI_Device.h(45): error C2220: warning treated as error - no 'object' file generated
D:\Dolphin\src\Source\Core\Core\HW\SI\SI_Device.h(45): warning C5054: operator '|': deprecated between enumerations of different types
D:\Dolphin\src\Source\Core\Core\HW\SI\SI_Device.h(45): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings
D:\Dolphin\src\Source\Core\Core\HW\SI\SI_Device.h(49): warning C5054: operator '|': deprecated between enumerations of different types
D:\Dolphin\src\Source\Core\Core\HW\SI\SI_Device.h(49): note: to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings


Files

dolphin_log_x64_build.log (285 KB) dolphin_log_x64_build.log QuellaZhang, 04/29/2019 02:56 AM
dophin_log_x64_build.log (233 KB) dophin_log_x64_build.log QuellaZhang, 05/13/2019 09:58 AM
Actions

Also available in: Atom PDF