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/repl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/repl.c') diff --git a/src/repl.c b/src/repl.c index efdfefcf..e4a7b7a4 100644 --- a/src/repl.c +++ b/src/repl.c @@ -332,8 +332,10 @@ void run(env_t *env, ast_t *ast) } } +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif void eval(env_t *env, ast_t *ast, void *dest) { type_t *t = get_type(env, ast); @@ -542,6 +544,8 @@ void eval(env_t *env, ast_t *ast, void *dest) print_err("Eval not implemented for ", ast_to_str(ast)); } } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3