From d90fa596a309f32c87368a54a843c021ba3cf641 Mon Sep 17 00:00:00 2001 From: nhmall Date: Wed, 1 Feb 2023 09:55:41 -0500 Subject: [PATCH] refine detection by compiler version in tradstdc.h --- include/tradstdc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/tradstdc.h b/include/tradstdc.h index 02f4c4a57..afbafe584 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -472,9 +472,11 @@ inline char *rindex(const char *s, int c) __attribute__ ((unavailable)); #endif #endif #if defined(__clang__) +#if __clang_major__ >= 7 inline char *index(const char *s, int c) __attribute__ ((unavailable)); inline char *rindex(const char *s, int c) __attribute__ ((unavailable)); #endif +#endif #endif /* TRADSTDC_H */ -- 2.50.1