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/tomo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/tomo.c') diff --git a/src/tomo.c b/src/tomo.c index e7bc3420..21ebed2f 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -82,8 +82,10 @@ typedef struct { bool h:1, c:1, o:1; } staleness_t; +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif int main(int argc, char *argv[]) { // Get the file modification time of the compiler, so we @@ -251,7 +253,9 @@ int main(int argc, char *argv[]) } return 0; } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif Text_t escape_lib_name(Text_t lib_name) { -- cgit v1.2.3