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/integers.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/stdlib/integers.h') diff --git a/src/stdlib/integers.h b/src/stdlib/integers.h index 356e791c..779bee1f 100644 --- a/src/stdlib/integers.h +++ b/src/stdlib/integers.h @@ -277,8 +277,10 @@ MACROLIKE PUREFUNC bool Int$is_negative(Int_t x) { // Constructors/conversion functions: // Int constructors: +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif MACROLIKE PUREFUNC Int_t Int$from_num(double n, bool truncate) { mpz_t result; mpz_init_set_d(result, n); @@ -425,6 +427,8 @@ MACROLIKE PUREFUNC Int8_t Int8$from_int16(Int16_t i16, bool truncate) { fail("Integer is too big to fit in a 8-bit integer: ", i16); return i8; } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3