浏览代码

fix:[kstdio]Disable "-Wimplicit-fallthrough" below GNUC V7 (#9459)

fix:Disable "-Wimplicit-fallthrough" below GNUC V7
wdfk-prog 7 月之前
父节点
当前提交
5ec20c4289
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/klibc/kstdio.c

+ 1 - 1
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"