aboutsummaryrefslogtreecommitdiff
path: root/pw_rpc/public/pw_rpc/internal/method_lookup.h
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-01-17 22:13:58 -0800
committerXin Li <delphij@google.com>2024-01-17 22:13:58 -0800
commit28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6 (patch)
treec1643be8ab17fc607cea748a8bb1d621a5964873 /pw_rpc/public/pw_rpc/internal/method_lookup.h
parentec2628a6ba2d0ecbe3ac10c8c772f6fc6acc345d (diff)
parentf054515492af5132f685cb23fe11891ee77104c9 (diff)
downloadpigweed-28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6.tar.gz
Merge Android 24Q1 Release (ab/11220357)temp_319669529
Bug: 319669529 Merged-In: Iba357b308a79d0c8b560acd4f72b5423c9c83294 Change-Id: Icdf552029fb97a34e83c6dd7799433fc473a2506
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;
}