diff --git a/modules/dnn/src/op_inf_engine.hpp b/modules/dnn/src/op_inf_engine.hpp index 408fe0c4b7..7cf8a324aa 100644 --- a/modules/dnn/src/op_inf_engine.hpp +++ b/modules/dnn/src/op_inf_engine.hpp @@ -50,7 +50,7 @@ #pragma warning(disable: 4996) // was declared deprecated #endif -#if defined(__GNUC__) +#if defined(__GNUC__) && INF_ENGINE_VER_MAJOR_LT(INF_ENGINE_RELEASE_2020_1) #pragma GCC visibility push(default) #endif @@ -58,7 +58,7 @@ #include -#if defined(__GNUC__) +#if defined(__GNUC__) && INF_ENGINE_VER_MAJOR_LT(INF_ENGINE_RELEASE_2020_1) #pragma GCC visibility pop #endif