From 29711e45db0168832d4e75830737a7d024682db5 Mon Sep 17 00:00:00 2001 From: wdfk-prog <1425075683@qq.com> Date: Sun, 22 Sep 2024 09:49:59 +0800 Subject: [PATCH] fix:[kstdio]Disable "-Wimplicit-fallthrough" below GNUC V7 (#9459) fix:Disable "-Wimplicit-fallthrough" below GNUC V7 --- src/klibc/kstdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/klibc/kstdio.c b/src/klibc/kstdio.c index 44ff758e92c..879a938b6a0 100644 --- a/src/klibc/kstdio.c +++ b/src/klibc/kstdio.c @@ -287,7 +287,7 @@ static char *print_number(char *buf, return buf; } -#if defined(__GNUC__) && !defined(__ARMCC_VERSION) /* GCC */ +#if defined(__GNUC__) && (__GNUC__ >= 7) && !defined(__ARMCC_VERSION) /* GCC */ #pragma GCC diagnostic push /* ignore warning: this statement may fall through */ #pragma GCC diagnostic ignored "-Wimplicit-fallthrough"