-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Description
Description:
Note:
To reproduce this, you'll need wait for VS 2022 17.12 Preview or later version to ship which will contain this change.
Recently, we have been building this project using the latest build of MSVC, and we have encountered the following error:
Serious-Engine\Sources\Engine\Base\CTString.cpp(511,35):
error C2488: 'CTString::ScanF': 'naked' can only be applied to non-member function definitionsReproduction Step
- git clone https://github.com/Croteam-official/Serious-Engine.git
- cd /d C:\gitP\Croteam-official\Serious-Engine\Sources
- msbuild /p:Platform=Win32 /p:Configuration=Release /p:PlatformToolset=v143 All.sln /t:Rebuild /m /p:BuildInParallel=true 2>&1
Expected Behavior
It compiles.
Actual result
Serious-Engine\Sources\Engine\Base\CTString.cpp(511,35):
error C2488: 'CTString::ScanF': 'naked' can only be applied to non-member function definitionsComplete build log:
Build.log
Other information
This is the narrowed down repro, test.cpp:
struct Foo {
__declspec(naked) void func1() {} // gets C2488
void func2();
__declspec(naked) static void func3() {} // gets C2488
};
__declspec(naked) void Foo::func2() {} // should also get C2488repro command:
cl /c test.cppFor current version, you will only ger error C2488 on line 2 and 4. For the upcoming version of VS, the last line will be also getting the error C2488.
Metadata
Metadata
Assignees
Labels
No labels