Page MenuHomeWildfire Games

Fix MSVC unknown pragma warning
ClosedPublic

Authored by wraitii on Mar 2 2021, 9:40 AM.

Details

Summary

Follows rP24969.

Reported by: Stan

Test Plan

Compile on MSVC.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Mar 2 2021, 9:40 AM
Vulcan added a comment.Mar 2 2021, 9:41 AM

Build failure - The Moirai have given mortals hearts that can endure.

builderr-debug-macos.txt
fatal error: file '/Users/wfg/Jenkins/workspace/macos-differential/build/workspaces/gcc/../../../libraries/osx/fmt/include/fmt/format.h' has been modified since the precompiled header 'obj/simulation2_Debug/precompiled.h.gch' was built
note: please rebuild precompiled header 'obj/simulation2_Debug/precompiled.h.gch'
1 error generated.
make[1]: *** [obj/simulation2_Debug/ComponentManager.o] Error 1
make: *** [simulation2] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/3387/display/redirect

Vulcan added a comment.Mar 2 2021, 9:45 AM

Successful build - Chance fights ever on the side of the prudent.

Debug: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Release: 
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/4485/display/redirect

wraitii requested review of this revision.Mar 2 2021, 9:59 AM
Stan accepted this revision.Mar 2 2021, 3:31 PM
Stan added a subscriber: Stan.

Seems to fix the warnings for me. I suppose that GCC7 bug is not documented?

This revision is now accepted and ready to land.Mar 2 2021, 3:31 PM
In D3623#158262, @Stan wrote:

I suppose that GCC7 bug is not documented?

What do you mean?

This revision was landed with ongoing or failed builds.Mar 2 2021, 4:00 PM
This revision was automatically updated to reflect the committed changes.
Stan added a comment.Mar 2 2021, 4:00 PM

Well I'm wondering whether it's spurious because it makes no sense, or whether it's spurious because it's annoying to fix :)

In D3623#158276, @Stan wrote:

Well I'm wondering whether it's spurious because it makes no sense, or whether it's spurious because it's annoying to fix :)

It's just that GCC7 isn't good enough at handling if constexpr. Later versions don't produce the warning.