Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Fix all paths through this function will call itself (#8451)
Browse files Browse the repository at this point in the history
Fix compile error for x86/Linux
- disable "infinite-recursion" for "recursiveFtn" function
- only for clang
  • Loading branch information
seanshpark authored and jkotas committed Dec 5, 2016
1 parent 3891c5f commit 7200e78
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vm/i386/gmsx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ static int __stdcall zeroFtn() {
return 0;
}

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winfinite-recursion"
#endif

static int __stdcall recursiveFtn() {
return recursiveFtn()+1;
}

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#pragma optimize("", on )


Expand Down

0 comments on commit 7200e78

Please sign in to comment.