diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 15:31:53 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-28 15:31:53 -0400 |
| commit | ca76fb335ae7b3f820beeeed5667950e7489711e (patch) | |
| tree | e0ef48cce92aeeb92241ef98c65bf3af84c05ca4 /src/stdlib/tables.c | |
| parent | 4de0fee8f694503b453e04084caaab55f8670b6c (diff) | |
Add compiler guards for GCC directives
Diffstat (limited to 'src/stdlib/tables.c')
| -rw-r--r-- | src/stdlib/tables.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c index da754847..dfa35236 100644 --- a/src/stdlib/tables.c +++ b/src/stdlib/tables.c @@ -215,8 +215,10 @@ static void hashmap_resize_buckets(Table_t *t, uint32_t new_capacity, const Type } // Return address of value +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif public void *Table$reserve(Table_t *t, const void *key, const void *value, const TypeInfo_t *type) { assert(type->tag == TableInfo); @@ -278,7 +280,9 @@ public void *Table$reserve(Table_t *t, const void *key, const void *value, const Table$set_bucket(t, entry, entry_index, type); return entry + value_offset(type); } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif public void Table$set(Table_t *t, const void *key, const void *value, const TypeInfo_t *type) { @@ -768,8 +772,10 @@ public void Table$serialize(const void *obj, FILE *out, Table_t *pointers, const Optional$serialize(&t->fallback, out, pointers, Optional$info(sizeof(void*), __alignof__(void*), Pointer$info("&", type))); } +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif public void Table$deserialize(FILE *in, void *outval, Array_t *pointers, const TypeInfo_t *type) { int64_t len; @@ -788,6 +794,8 @@ public void Table$deserialize(FILE *in, void *outval, Array_t *pointers, const T *(Table_t*)outval = t; } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
