From 8a7d25bb10b850fd4cac460e8fe77be83d0eaa58 Mon Sep 17 00:00:00 2001 From: SaeHie Park Date: Mon, 5 Dec 2016 17:04:41 +0900 Subject: [PATCH] [x86/Linux] Fix all paths through this function will call itself (dotnet/coreclr#8451) Fix compile error for x86/Linux - disable "infinite-recursion" for "recursiveFtn" function - only for clang Commit migrated from https://github.com/dotnet/coreclr/commit/7200e78258623eb889a46aa7a90818046bd1957d --- src/coreclr/src/vm/i386/gmsx86.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/coreclr/src/vm/i386/gmsx86.cpp b/src/coreclr/src/vm/i386/gmsx86.cpp index a7afcb9..d4b2c0a 100644 --- a/src/coreclr/src/vm/i386/gmsx86.cpp +++ b/src/coreclr/src/vm/i386/gmsx86.cpp @@ -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 ) -- 2.7.4