diff --git a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp index 5d25e9f942d..4c35500194a 100644 --- a/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp +++ b/src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp @@ -126,7 +126,7 @@ struct FlowQueue } // TODO: remove optimization with GCC > 15 - #if defined(__linux__) + #if defined(__linux__) && defined(__GNUC__) [[gnu::optimize("no-delete-null-pointer-checks")]] #endif // if defined(__GNUC__) bool is_empty() const noexcept