From ca76fb335ae7b3f820beeeed5667950e7489711e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 28 Mar 2025 15:31:53 -0400 Subject: Add compiler guards for GCC directives --- src/stdlib/structs.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/stdlib/structs.c') diff --git a/src/stdlib/structs.c b/src/stdlib/structs.c index ca88262c..53b0e0a4 100644 --- a/src/stdlib/structs.c +++ b/src/stdlib/structs.c @@ -14,8 +14,10 @@ #include "text.h" #include "util.h" +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif PUREFUNC public uint64_t Struct$hash(const void *obj, const TypeInfo_t *type) { if (type->StructInfo.num_fields == 0) @@ -50,7 +52,9 @@ PUREFUNC public uint64_t Struct$hash(const void *obj, const TypeInfo_t *type) } return siphash24((void*)field_hashes, sizeof(field_hashes)); } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif PUREFUNC public uint64_t PackedData$hash(const void *obj, const TypeInfo_t *type) { -- cgit v1.2.3