Skip to content

Commit

Permalink
[x86/Linux] Fix all paths through this function will call itself (dot…
Browse files Browse the repository at this point in the history
…net/coreclr#8451)

Fix compile error for x86/Linux
- disable "infinite-recursion" for "recursiveFtn" function
- only for clang

Commit migrated from dotnet/coreclr@7200e78
  • Loading branch information
seanshpark authored and jkotas committed Dec 5, 2016
1 parent 9e313c3 commit 8a7d25b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/coreclr/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 8a7d25b

Please sign in to comment.