Remove warning when __builtin_frame_address is used with gcc >= 6.
This commit is contained in:
parent
d2e2f42382
commit
ed99f3608d
1 changed files with 13 additions and 0 deletions
13
lib/bcheck.c
13
lib/bcheck.c
|
@ -234,6 +234,15 @@ BOUND_PTR_INDIR(8)
|
||||||
BOUND_PTR_INDIR(12)
|
BOUND_PTR_INDIR(12)
|
||||||
BOUND_PTR_INDIR(16)
|
BOUND_PTR_INDIR(16)
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 6)
|
||||||
|
/*
|
||||||
|
* At least gcc 6.2 complains when __builtin_frame_address is used whith
|
||||||
|
* nonzero argument.
|
||||||
|
*/
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wframe-address"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* return the frame pointer of the caller */
|
/* return the frame pointer of the caller */
|
||||||
#define GET_CALLER_FP(fp)\
|
#define GET_CALLER_FP(fp)\
|
||||||
{\
|
{\
|
||||||
|
@ -274,6 +283,10 @@ void FASTCALL __bound_local_delete(void *p1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 6)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
static BoundEntry *__bound_new_page(void)
|
static BoundEntry *__bound_new_page(void)
|
||||||
{
|
{
|
||||||
BoundEntry *page;
|
BoundEntry *page;
|
||||||
|
|
Loading…
Reference in a new issue