From d56713b9af1115cb079002bc3ad16f6ced2657c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20G=C3=A1l?= Date: Thu, 8 Jun 2017 10:07:40 +0200 Subject: [PATCH] When compiling with gcc 7 the current fallthrough comments (#1878) are not accepted. This is a bug in gcc 7. For now disable the fallthrough comment detection. Disabling the check does not introduce any risk as previously it was not enabled by default and vera++ already check these kind of comments. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c46975566..d27997cb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,6 +221,12 @@ if(ENABLE_STRIP AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug") jerry_add_link_flags(-s) endif() +# TODO: Remove workaround for gcc 7 bug if the +# fallthrough comment detection is fixed. +if (USING_GCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 7.0) + jerry_add_compile_flags(-Wno-implicit-fallthrough) +endif() + # External compiler & linker flags if(DEFINED EXTERNAL_COMPILE_FLAGS) jerry_add_compile_flags(${EXTERNAL_COMPILE_FLAGS})