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/integers.h | |
| parent | 4de0fee8f694503b453e04084caaab55f8670b6c (diff) | |
Add compiler guards for GCC directives
Diffstat (limited to 'src/stdlib/integers.h')
| -rw-r--r-- | src/stdlib/integers.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
