From d026417177bc8a619ef0f43eef7eba5fcec1c3ba Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Tue, 7 Oct 2025 16:01:52 +0200 Subject: [PATCH] Refs #23620. Guard `gnu::optimize` with `defined(__GNUC__)` Signed-off-by: Miguel Company --- src/cpp/rtps/flowcontrol/FlowControllerImpl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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