From aff77004fed118b58ad1376a1e80a75eedfe725b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 2 Apr 2020 13:39:52 +0200 Subject: [PATCH] cmake: Set -Wstrict-aliasing=2 Signed-off-by: Andreas Schneider --- CompilerChecks.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 4fa1a83..e818157 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -40,6 +40,7 @@ if (UNIX) add_c_compiler_flag("-Wimplicit-fallthrough" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Werror=strict-overflow" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wstrict-overflow=2" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wstrict-aliasing=2" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS) check_c_compiler_flag("-Wformat" REQUIRED_FLAGS_WFORMAT) -- GitLab