diff --git a/src/event/EpollBackend.hxx b/src/event/EpollBackend.hxx index 9ea024a0b..e623591f0 100644 --- a/src/event/EpollBackend.hxx +++ b/src/event/EpollBackend.hxx @@ -20,7 +20,6 @@ #ifndef EVENT_EPOLL_BACKEND_HXX #define EVENT_EPOLL_BACKEND_HXX -#include "util/Compiler.h" #include "system/EpollFD.hxx" #include diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index 5a936d03f..664ec1c77 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -25,7 +25,6 @@ #include "SocketEvent.hxx" #include "event/Features.h" #include "time/ClockCache.hxx" -#include "util/Compiler.h" #include "util/IntrusiveList.hxx" #ifdef HAVE_THREADED_EVENT_LOOP @@ -183,7 +182,7 @@ public: * iteration, because it is assumed that the event loop runs * for a negligible duration. */ - gcc_pure + [[gnu::pure]] const auto &SteadyNow() const noexcept { #ifdef HAVE_THREADED_EVENT_LOOP assert(IsInside()); @@ -193,7 +192,7 @@ public: } #ifdef HAVE_URING - gcc_pure + [[gnu::pure]] Uring::Queue *GetUring() noexcept; #endif @@ -298,7 +297,7 @@ public: /** * Are we currently running inside this EventLoop's thread? */ - gcc_pure + [[gnu::pure]] bool IsInside() const noexcept { #ifdef HAVE_THREADED_EVENT_LOOP return thread.IsInside(); diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index 3b907efa5..778a2b8ce 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -100,7 +100,7 @@ public: event.Close(); } - [[nodiscard]] gcc_pure + [[nodiscard]] [[gnu::pure]] std::string ToString() const noexcept { return ::ToString(address); } @@ -328,7 +328,7 @@ ServerSocket::AddPortIPv6(unsigned port) noexcept /** * Is IPv6 supported by the kernel? */ -gcc_pure +[[gnu::pure]] static bool SupportsIPv6() noexcept {