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 #1

Updated by JosJuice over 5 years ago

  • Milestone set to Current
  • Relates to maintainability changed from No to Yes
Actions #2

Updated by Billiard26 over 5 years ago

  • Status changed from New to Fix pending
Actions #3

Updated by Lioncash over 5 years ago

  • Status changed from Fix pending to Fixed
Actions #5

Updated by QuellaZhang over 5 years ago

Thanks all of you. Verified on latest version 906ccdb, warning C5054 has gone, but Dolphin failed due to other warning C5055 when build, can you help look at this? If need to open a new issue please let me know.

D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(83): error C2220: warning treated as error - no 'object' file generated
D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(83): warning C5055: operator '<=': deprecated between enumerations and floating-point types
D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(83): 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\VideoCommon\VertexShaderManager.cpp(83): warning C5055: operator '-': deprecated between enumerations and floating-point types
D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(83): 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\VideoCommon\VertexShaderManager.cpp(84): warning C5055: operator '<=': deprecated between enumerations and floating-point types
D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(84): 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\VideoCommon\VertexShaderManager.cpp(84): warning C5055: operator '-': deprecated between enumerations and floating-point types
D:\Dolphin\src\Source\Core\VideoCommon\VertexShaderManager.cpp(84): 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

Actions #7

Updated by QuellaZhang over 5 years ago

Thank you. The previous warning has not existed with your fix. But as the build time increases, more warnings are triggered. I provided a detailed build log(see attachment), not sure if there are more, if so, I will also provide the log.

Actions #8

Updated by JosJuice over 5 years ago

  • Status changed from Fixed to Accepted

Reopening until all warnings of this type are fixed.

Actions #9

Updated by JosJuice over 5 years ago

https://github.com/dolphin-emu/dolphin/pull/8056 should fix the most recent warnings.

Actions #10

Updated by JosJuice over 5 years ago

That PR has been merged now. Could you test again?

Actions #11

Updated by QuellaZhang over 5 years ago

One error, see attachment.

D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(376,39): warning C5054: operator '|': deprecated between enumerations of different types [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(376,39): warning C5054: const u8 type = LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE; [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(376,39): warning C5054: ^ [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(386,39): warning C5054: operator '|': deprecated between enumerations of different types [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(386,39): warning C5054: const u8 type = LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE; [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(386,39): warning C5054: ^ [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(407,39): warning C5054: operator '|': deprecated between enumerations of different types [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(407,39): warning C5054: const u8 type = LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE; [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]
D:\Dolphin\src\Source\Core\Core\IOS\USB\Bluetooth\BTReal.cpp(407,39): warning C5054: ^ [D:\Dolphin\src\Source\Core\Core\Core.vcxproj] ^ [D:\Dolphin\src\Source\Core\Core\Core.vcxproj]

Actions #12

Updated by JosJuice over 5 years ago

Sorry for the inactivity. Those warnings should be fixed by https://dolphin-emu.org/download/dev/674a66aab2fa54c9b4c39a027d1701620fc0bafa/. Could you re-test?

Actions #13

Updated by Billiard26 about 5 years ago

  • Status changed from Accepted to Fixed

No response. Assuming fixed.

Actions #14

Updated by JosJuice about 5 years ago

  • Fixed in changed from 5.0-10071 to 5.0-10850
Actions

Also available in: Atom PDF