diff --git a/cmake/compiler/compiler_flags_template.cmake b/cmake/compiler/compiler_flags_template.cmake index 63e1a0df6a1..b6fb8eb4d46 100644 --- a/cmake/compiler/compiler_flags_template.cmake +++ b/cmake/compiler/compiler_flags_template.cmake @@ -108,3 +108,6 @@ set_property(TARGET compiler-cpp PROPERTY no_threadsafe_statics) # Required ASM flags when compiling set_property(TARGET asm PROPERTY required) + +# Compiler flag for disabling pointer arithmetic warnings +set_compiler_property(PROPERTY warning_no_pointer_arithmetic) diff --git a/cmake/compiler/gcc/compiler_flags.cmake b/cmake/compiler/gcc/compiler_flags.cmake index 495cd8f0376..df242be4240 100644 --- a/cmake/compiler/gcc/compiler_flags.cmake +++ b/cmake/compiler/gcc/compiler_flags.cmake @@ -189,3 +189,6 @@ set_property(TARGET asm PROPERTY required "-xassembler-with-cpp") if (NOT COMPILER STREQUAL "xcc") set_compiler_property(PROPERTY diagnostic -fdiagnostics-color=always) endif() + +# Compiler flag for disabling pointer arithmetic warnings +set_compiler_property(PROPERTY warning_no_pointer_arithmetic "-Wno-pointer-arith")