gcc flag to prevent use of VLA

This commit is contained in:
Enno Rehling 2018-10-29 20:12:54 +01:00
parent 253849416a
commit bf9c50cfc5

View file

@ -21,7 +21,7 @@ COMPILE_DEFINITIONS ERESSEA_BUILDNO="${ERESSEA_BUILDNO}")
ENDIF()
IF (CMAKE_COMPILER_IS_GNUCC)
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wvla")
ENDIF()
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")