From f4a6134461e844796af13fa0e86d89d0f9d27e73 Mon Sep 17 00:00:00 2001 From: DennySun2100 <138833544+DennySun2100@users.noreply.github.com> Date: Mon, 21 Aug 2023 11:54:09 -0700 Subject: [PATCH] GCC pragma causes warning on non-GNU compilers --- lib/include/tree_sitter/api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/include/tree_sitter/api.h b/lib/include/tree_sitter/api.h index 1cc6b3e9..5003cff7 100644 --- a/lib/include/tree_sitter/api.h +++ b/lib/include/tree_sitter/api.h @@ -1,7 +1,9 @@ #ifndef TREE_SITTER_API_H_ #define TREE_SITTER_API_H_ +#ifdef __GNUC__ #pragma GCC visibility push(default) +#endif #ifdef __cplusplus extern "C" { @@ -1165,6 +1167,8 @@ void ts_set_allocator( } #endif +#ifdef __GNUC__ #pragma GCC visibility pop +#endif #endif // TREE_SITTER_API_H_