Skip to content
Snippets Groups Projects
Commit 8f70a473 authored by Philippe Canal's avatar Philippe Canal
Browse files

Avoid warning about our use of __builtin_frame_address.

gcc complains that passing any other value than 0 is unsafe and show be used only in debug situations
parent 4c43b728
Branches
Tags
No related merge requests found
......@@ -492,6 +492,7 @@ static void *get_stack_pointer(int level)
{
void *p = 0;
#if defined(R__GNU) && (defined(R__LINUX) || defined(R__HURD))
#pragma GCC diagnostic ignored "-Wframe-address"
switch (level) {
case 0:
if (__builtin_frame_address(1))
......
......@@ -11,6 +11,10 @@
#ifndef ROOT_TMemStatBacktrace
#define ROOT_TMemStatBacktrace
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wframe-address"
#endif
#define _INIT_TOP_STACK extern void *g_global_stack_end;
#define _GET_CALLER_FRAME_ADDR g_global_stack_end = __builtin_frame_address(1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment