@@ -225,9 +225,36 @@ prepend(KPHP_COMPILER_SOURCES ${KPHP_COMPILER_DIR}/
225225 utils/string-utils.cpp )
226226
227227# Suppress YAML-cpp-related warnings
228- if (COMPILER_CLANG)
229- allow_deprecated_declarations (${KPHP_COMPILER_DIR} /data/composer-json-data.cpp )
230- allow_deprecated_declarations (${KPHP_COMPILER_DIR} /data/modulite-data.cpp )
228+ if (COMPILER_CLANG OR (COMPILER_GCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0.0" )))
229+ allow_deprecated_declarations (
230+ ${KPHP_COMPILER_DIR} /data/composer-json-data.cpp
231+ ${KPHP_COMPILER_DIR} /data/modulite-data.cpp
232+ )
233+ endif ()
234+
235+ if (COMPILER_GCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "12.0.0" ))
236+ allow_stringop_overflow (
237+ ${KPHP_COMPILER_DIR} /code-gen/vertex-compiler.cpp
238+ ${KPHP_COMPILER_DIR} /data/class-data.cpp
239+ ${KPHP_COMPILER_DIR} /data/kphp-json-tags.cpp
240+ ${KPHP_COMPILER_DIR} /data/generics-mixins.cpp
241+ ${KPHP_COMPILER_DIR} /data/kphp-tracing-tags.cpp
242+ ${KPHP_COMPILER_DIR} /data/modulite-data.cpp
243+ ${KPHP_COMPILER_DIR} /code-gen/files/tracing-autogen.cpp
244+ ${KPHP_COMPILER_DIR} /pipes/analyze-performance.cpp
245+ ${KPHP_COMPILER_DIR} /pipes/check-access-modifiers.cpp
246+ ${KPHP_COMPILER_DIR} /pipes/check-classes.cpp
247+ ${KPHP_COMPILER_DIR} /pipes/check-tl-classes.cpp
248+ ${KPHP_COMPILER_DIR} /pipes/code-gen.cpp
249+ ${KPHP_COMPILER_DIR} /pipes/filter-only-actually-used.cpp
250+ ${KPHP_COMPILER_DIR} /pipes/final-check.cpp
251+ ${KPHP_COMPILER_DIR} /pipes/parse-and-apply-phpdoc.cpp
252+ ${KPHP_COMPILER_DIR} /pipes/sort-and-inherit-classes.cpp
253+ ${KPHP_COMPILER_DIR} /pipes/register-kphp-configuration.cpp
254+ ${KPHP_COMPILER_DIR} /phpdoc.cpp
255+ ${KPHP_COMPILER_DIR} /gentree.cpp
256+ ${KPHP_COMPILER_DIR} /make/make.cpp
257+ )
231258endif ()
232259
233260if (APPLE )
0 commit comments