aboutsummaryrefslogtreecommitdiff
path: root/stdlib/arrays.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-29 23:14:31 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-29 23:14:31 -0400
commit9ebb039a81f5ea06e97d84ef7ee447da9dfca204 (patch)
treedc229247feb19ddec117e3c680dd1c13a40dbdd1 /stdlib/arrays.c
parent3e019df9f429caef4b05947cc70652634ebb2467 (diff)
Fix up some GCC compiler flag options for LTO and inlining
Diffstat (limited to 'stdlib/arrays.c')
-rw-r--r--stdlib/arrays.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/arrays.c b/stdlib/arrays.c
index 93676979..6b61f5b5 100644
--- a/stdlib/arrays.c
+++ b/stdlib/arrays.c
@@ -16,7 +16,7 @@
#include "siphash.h"
#include "siphash-internals.h"
-PUREFUNC static inline int64_t get_padded_item_size(const TypeInfo_t *info)
+PUREFUNC static INLINE int64_t get_padded_item_size(const TypeInfo_t *info)
{
int64_t size = info->ArrayInfo.item->size;
if (info->ArrayInfo.item->align > 1 && size % info->ArrayInfo.item->align)
@@ -249,6 +249,7 @@ public Array_t Array$sorted(Array_t arr, Closure_t comparison, int64_t padded_it
return arr;
}
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstack-protector"
public void Array$shuffle(Array_t *arr, int64_t padded_item_size)
{
@@ -263,6 +264,7 @@ public void Array$shuffle(Array_t *arr, int64_t padded_item_size)
memcpy((void*)arr->data + j*padded_item_size, tmp, (size_t)padded_item_size);
}
}
+#pragma GCC diagnostic pop
public Array_t Array$shuffled(Array_t arr, int64_t padded_item_size)
{
@@ -583,7 +585,6 @@ public uint64_t Array$hash(const Array_t *arr, const TypeInfo_t *type)
return siphashfinish_last_part(&sh, 0);
}
-#pragma GCC diagnostic ignored "-Wstack-protector"
static void siftdown(Array_t *heap, int64_t startpos, int64_t pos, Closure_t comparison, int64_t padded_item_size)
{
assert(pos > 0 && pos < heap->length);