aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Jullien <Christian Jullien>2016-11-30 06:18:48 +0100
committerChristian Jullien <Christian Jullien>2016-11-30 06:18:48 +0100
commited99f3608df3d6dd4c8c7d52d608a8212203dfe4 (patch)
tree97e3fbc29af80c266210142ebc2d9582ebf9ac28 /lib
parentd2e2f423820ca00c1f1d56fadd744a7e1d345955 (diff)
downloadtinycc-ed99f3608df3d6dd4c8c7d52d608a8212203dfe4.tar.gz
tinycc-ed99f3608df3d6dd4c8c7d52d608a8212203dfe4.tar.bz2
Remove warning when __builtin_frame_address is used with gcc >= 6.
Diffstat (limited to 'lib')
-rw-r--r--lib/bcheck.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/bcheck.c b/lib/bcheck.c
index 756c539..d3b9955 100644
--- a/lib/bcheck.c
+++ b/lib/bcheck.c
@@ -234,6 +234,15 @@ BOUND_PTR_INDIR(8)
BOUND_PTR_INDIR(12)
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 */
#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)
{
BoundEntry *page;