aboutsummaryrefslogtreecommitdiff
path: root/pw_rpc/public/pw_rpc/internal/method_lookup.h
diff options
context:
space:
mode:
Diffstat (limited to 'pw_rpc/public/pw_rpc/internal/method_lookup.h')
-rw-r--r--pw_rpc/public/pw_rpc/internal/method_lookup.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/pw_rpc/public/pw_rpc/internal/method_lookup.h b/pw_rpc/public/pw_rpc/internal/method_lookup.h
index 232e0c4db..13fc226ff 100644
--- a/pw_rpc/public/pw_rpc/internal/method_lookup.h
+++ b/pw_rpc/public/pw_rpc/internal/method_lookup.h
@@ -52,8 +52,14 @@ class MethodLookup {
template <typename Service, uint32_t kMethodId>
static constexpr const auto& GetMethodUnion() {
constexpr auto method = GetMethodUnionPointer<Service>(kMethodId);
+// TODO: b/285367496 - Remove this #ifndef guard when the static assert
+// compiles correctly when using the Andestech RISC-V GCC 10.3.0 toolchain.
+#if !(defined(__riscv) && defined(__nds_v5) && (__GNUC__ == 10) && \
+ (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 0))
static_assert(method != nullptr,
"The selected function is not an RPC service method");
+#endif // !(defined(__riscv) && defined(__nds_v5) && (__GNUC__ == 10)
+ // && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 0))
return *method;
}