mamedev / mame

MAME
https://www.mamedev.org/
Other
8.43k stars 2.04k forks source link

Compile error in mame\src\mame\exidy\circus.cpp #13046

Open NEIL-smtg opened 11 hours ago

NEIL-smtg commented 11 hours ago

MAME version

latest commit

System information

Windows 11, 64-bit, version 22H2

INI configuration details

No response

Emulated system/software

No response

Incorrect behaviour

C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(159,46): error C2059: syntax error: ')' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(159,46): error C3553: decltype expects an expression not a type [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(159,46): error C2947: expecting '>' to terminate template-argument-list, found '>' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(159,46): error C2440: 'static_cast': cannot convert from 'construct_ioport_circus::<lambda_8b02ac597ee9667b77f38ba7c443d7c0>' to 'ioport_value (__cdecl *)(unknown-type &)' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(193,47): error C2059: syntax error: ')' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(193,47): error C3553: decltype expects an expression not a type [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(193,47): error C2947: expecting '>' to terminate template-argument-list, found '>' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(193,47): error C2440: 'static_cast': cannot convert from 'construct_ioport_robotbwl::<lambda_bbb95f7aeeb78ae8a22aff02d4a60357>' to 'ioport_value (__cdecl *)(unknown-type &)' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(227,47): error C2059: syntax error: ')' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(227,47): error C3553: decltype expects an expression not a type [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(227,47): error C2947: expecting '>' to terminate template-argument-list, found '>' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(227,47): error C2440: 'static_cast': cannot convert from 'construct_ioport_crash::<lambda_9ba538c5f8b630c9eafc171cd978a745>' to 'ioport_value (__cdecl *)(unknown-type &)' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]
C:\gitP\mamedev\mame\src\mame\exidy\circus.cpp(267,46): error C2059: syntax error: ')' [C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022\mame_tiny.vcxproj]

Expected behaviour

It compiles.

Steps to reproduce

  1. Open x64 native tools command prompt for vs2022
  2. git clone https://github.com/mamedev/mame.git
  3. cd /d C:\gitP\mamedev\mame
  4. set PATH=C:\tools\msys64\usr\bin;C:\tools\msys64\mingw64\bin;%PATH% 2>&1
  5. make SUBTARGET=tiny PTR64=1 TOOLS=1 OPTIMIZE=0 NOWERROR=1 MODERN_WIN_API=1 NO_USE_PORTAUDIO=1 vs2022 -j4 2>&1
  6. copy C:\repos\msvc\src\qa\suites\rwc\projects\mame\projectfiles* C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022
  7. cd /d C:\gitP\mamedev\mame\build\projects\windows\mametiny\vs2022
  8. msbuild /m /p:Platform=x64 /p:Configuration=Release /p:PreferredToolArchitecture=x64 mametiny.sln /t:Rebuild 2>&1

Additional details

I work on Microsoft Visual C++ testing, where we regularly build popular open-source projects, including yours, with development builds of our compiler and libraries to detect and prevent shipping regressions that would affect you. This also allows us to provide advance notice of breaking changes, which is the case here.

Here is the build log: mame.txt

angelosa commented 11 hours ago

Apparently failing at PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen") which are macros available in https://github.com/mamedev/mame/blob/master/src/emu/ioport.h#L1457-L1461

pmackinlay commented 9 hours ago

Your build log appears to indicate you're not using the latest GENie and MSVC compiler options such as /Zc:preprocessor. Have you cleaned your build environment and are you working from top of tree? I think you also need to use a very recent version of MSVC delivered with VS2022 (17.12.2?).