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/text.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/stdlib/text.c') diff --git a/src/stdlib/text.c b/src/stdlib/text.c index 254ed567..177a9130 100644 --- a/src/stdlib/text.c +++ b/src/stdlib/text.c @@ -134,8 +134,10 @@ static const TypeInfo_t GraphemeClusterInfo = { }, }; +#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstack-protector" +#endif public int32_t get_synthetic_grapheme(const ucs4_t *codepoints, int64_t utf32_len) { ucs4_t length_prefixed[1+utf32_len]; @@ -224,7 +226,9 @@ public int32_t get_synthetic_grapheme(const ucs4_t *codepoints, int64_t utf32_le last_grapheme = grapheme_id; return grapheme_id; } +#ifdef __GNUC__ #pragma GCC diagnostic pop +#endif int text_visualize(FILE *stream, Text_t t, int depth) { -- cgit v1.2.3