Fix build break due to unknown pragma (on gcc).
Change-Id: I36bf855769b243139fd45186ac53578448b87a2b
This commit is contained in:
parent
dc91dafa3b
commit
9466bb2ab6
1 changed files with 4 additions and 0 deletions
|
|
@ -51,8 +51,10 @@ __attribute__ ((noinline)) static int smash_stack(volatile int* plen) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Winfinite-recursion"
|
||||
#endif
|
||||
|
||||
static void* global = 0; // So GCC doesn't optimize the tail recursion out of overflow_stack.
|
||||
|
||||
|
|
@ -63,7 +65,9 @@ __attribute__((noinline)) static void overflow_stack(void* p) {
|
|||
overflow_stack(&buf);
|
||||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
static void *noisy(void *x)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue