barbudreadmon / fbalpha-backup-dontuse-ty

Deprecated port of Final Burn Alpha to Libretro (v0.2.97.43).
61 stars 43 forks source link

msvc2017 regression ? #178

Closed barbudreadmon closed 6 years ago

barbudreadmon commented 6 years ago

@claudiuslollarius @albertofustinoni @twinaphex Lately, i noticed every commit is tagged as failing because of msvc2017. Seems to me like "offsetof" is buggy in msvc2017 (i found topics like this one : https://developercommunity.visualstudio.com/content/problem/96174/offsetof-macro-is-broken-for-nested-objects.html). Could you take a look ?

barbudreadmon commented 6 years ago

I merged the PR (hot?)fixing this, i also asked upstream about it (they use msvc for their releases).

dinkc64 commented 6 years ago

msvc2017 fixed this issue back in October '17, I think it might be a good idea to look for an update to the compiler.

claudiuslollarius commented 6 years ago

This happens on the latest Visual Studio 2017 (15.5.6), so maybe you are thinking of a different issue?

barbudreadmon commented 6 years ago

The error was the following :

src/burn/drv/capcom/qs_c.cpp(144): error C2132: syntax error: unexpected identifier

I assumed it happened because of the offsetof (thanks for the useful error message microsoft...) and i guess i was right since replacing the offsetof macro fixed the build

It seems to be more related to this : https://developercommunity.visualstudio.com/content/problem/101755/compiler-error-with-offsetof-in-vs20173.html

barbudreadmon commented 6 years ago

From what i see in the topic i linked, msvc2017 dislike having a variable with the same name as the struct when using offsetof. So i guess the issue would be at line 40 ?

static struct QChan QChan[16];

barbudreadmon commented 6 years ago

Last commit properly fixed it, thanks for the help @dinkc64 :)