Calling this function with a nonzero argument can have unpredictable
effects, including crashing the calling program. As a result, calls that are
considered unsafe are diagnosed when the -Wframe-address option is in
effect. Such calls should only be made in debugging situations.
^^^^^ This latest sentence makes me afraid!
Two questions here:
Q1. Should we really call this function with one arg?
Q2. If safe, we should make this change to avoid this warning:
diff --git a/lib/bcheck.c b/lib/bcheck.c
index 756c539..8a75654 100644
--- a/lib/bcheck.c
+++ b/lib/bcheck.c
@@ -240,6 +240,9 @@ BOUND_PTR_INDIR(16)
fp = (size_t)__builtin_frame_address(1);\
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wframe-address"
+
/* called when entering a function to add all the local regions */
void FASTCALL __bound_local_new(void *p1)
{
@@ -273,6 +276,7 @@ void FASTCALL __bound_local_delete(void *p1)
__bound_delete_region((void *)addr);
}
}
+#pragma GCC diagnostic pop
static BoundEntry *__bound_new_page(void)
{
------------------------------------------------------------------------
_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel